Compare commits

...

2 Commits

Author SHA1 Message Date
Bill He
f61a8f3045
Update release to use tags for hotfix 2024-02-22 14:12:21 -08:00
Bill He
4a4baddb34
Github action for syncing the release branch 2024-02-21 11:17:00 -08:00

40
.github/workflows/update-release.yml vendored Normal file
View File

@ -0,0 +1,40 @@
name: Workflow for Release
on:
push:
tags:
- 'release/v*'
- 'hotfix/v*'
jobs:
sync-release-branch:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Git
run: |
git config user.name "github-actions"
git config user.email "actions@github.com"
- 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
- name: Sync release branch to tag
run: |
git reset --hard ${{ github.ref }}
git push -f origin release