Github action for syncing the release branch

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

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

@ -0,0 +1,29 @@
name: Workflow for Release
on:
release:
types: [created]
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: 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