From 48648e36627bcfc7750872951d09c8a3c3c7eab6 Mon Sep 17 00:00:00 2001 From: djperrefort Date: Sun, 30 Jun 2024 16:30:55 -0400 Subject: [PATCH] Adds CI for package release --- .github/workflows/Release.yml | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/Release.yml diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml new file mode 100644 index 0000000..0d1ad3d --- /dev/null +++ b/.github/workflows/Release.yml @@ -0,0 +1,43 @@ +name: 🎯 Release + +on: + release: + types: [ "released" ] + +env: + IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/keystone-api + +jobs: + version: + name: Get Release Version + runs-on: ubuntu-latest + outputs: + version: ${{ steps.get_version.outputs.version }} + + steps: + - name: Determine version from release tag + id: get_version + run: | + release_tag=${{github.ref}} + version="${release_tag#refs/tags/v}" + echo "version=$version" >> "$GITHUB_OUTPUT" + + build: + name: Build + needs: version + uses: ./.github/workflows/Build.yml + with: + version: ${{needs.version.outputs.version}} + + test: + name: Test + needs: build + uses: ./.github/workflows/Test.yml + + publish: + name: Publish + needs: [ version, test ] + uses: ./.github/workflows/Publish.yml + secrets: inherit + with: + version: ${{needs.version.outputs.version}}