Compare commits
2 Commits
main
...
release-wo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f61a8f3045 | ||
|
|
4a4baddb34 |
40
.github/workflows/update-release.yml
vendored
Normal file
40
.github/workflows/update-release.yml
vendored
Normal 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
|
||||||
Loading…
Reference in New Issue
Block a user