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