Update release to use tags for hotfix

This commit is contained in:
Bill He 2024-02-22 14:12:21 -08:00
parent 4a4baddb34
commit f61a8f3045
No known key found for this signature in database
GPG Key ID: 73AEEF9D79E5BBF8

View File

@ -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