From 7895df2d9f577c8fca4119c52e4eb2625c43a832 Mon Sep 17 00:00:00 2001 From: Hunter Thornsberry Date: Wed, 4 Sep 2024 00:35:22 -0400 Subject: [PATCH] Stop release on ci --- .github/workflows/ci.yml | 39 --------------------- .github/workflows/release.yml | 64 +++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 39 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4c3239a5..cd73ce31 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,42 +24,3 @@ jobs: - name: Build Package run: pnpm build - - - name: Package Output - run: pnpm package - - - name: Upload Artifact - uses: "marvinpinto/action-automatic-releases@latest" - with: - repo_token: "${{ secrets.GITHUB_TOKEN }}" - automatic_release_tag: "latest" - prerelease: false - files: | - ./dist/build.tar - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Buildah Build - id: build-container - uses: redhat-actions/buildah-build@v2 - with: - containerfiles: | - ./Containerfile - image: ${{github.event.repository.full_name}} - tags: latest ${{ github.sha }} - oci: true - platforms: linux/amd64, linux/arm64 - - - name: Push To Registry - id: push-to-registry - uses: redhat-actions/push-to-registry@v2 - with: - image: ${{ steps.build-container.outputs.image }} - tags: ${{ steps.build-container.outputs.tags }} - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Print image url - run: echo "Image pushed to ${{ steps.push-to-registry.outputs.registry-paths }}" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..0e59bdb4 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,64 @@ +name: 'Release' + +on: + release: + types: [released] + +permissions: + contents: write + packages: write + +jobs: + build-and-package: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + with: + version: latest + + - name: Install Dependencies + run: pnpm install + + - name: Build Package + run: pnpm build + + - name: Package Output + run: pnpm package + + - name: Upload Artifact + uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: "latest" + prerelease: false + files: | + ./dist/build.tar + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Buildah Build + id: build-container + uses: redhat-actions/buildah-build@v2 + with: + containerfiles: | + ./Containerfile + image: ${{github.event.repository.full_name}} + tags: latest ${{ github.sha }} + oci: true + platforms: linux/amd64, linux/arm64 + + - name: Push To Registry + id: push-to-registry + uses: redhat-actions/push-to-registry@v2 + with: + image: ${{ steps.build-container.outputs.image }} + tags: ${{ steps.build-container.outputs.tags }} + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Print image url + run: echo "Image pushed to ${{ steps.push-to-registry.outputs.registry-paths }}"