From f61a8f3045be341850f204aa2d0176458e8365f8 Mon Sep 17 00:00:00 2001 From: Bill He Date: Thu, 22 Feb 2024 14:12:21 -0800 Subject: [PATCH] Update release to use tags for hotfix --- .github/workflows/update-release.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-release.yml b/.github/workflows/update-release.yml index 8bf77d2..b3f946c 100644 --- a/.github/workflows/update-release.yml +++ b/.github/workflows/update-release.yml @@ -1,8 +1,10 @@ name: Workflow for Release on: - release: - types: [created] + push: + tags: + - 'release/v*' + - 'hotfix/v*' jobs: sync-release-branch: @@ -19,6 +21,15 @@ jobs: - name: Fetch all history run: git fetch --unshallow || git fetch --all + - name: Determine Tag Type + id: tagtype + run: | + if [[ ${{ github.ref }} == refs/tags/release/v* ]]; then + echo "::set-output name=type::release" + elif [[ ${{ github.ref }} == refs/tags/hotfix/v* ]]; then + echo "::set-output name=type::hotfix" + fi + - name: Check out the release branch run: | git checkout release || git checkout -b release