Skip to content

Commit f04bbfc

Browse files
authored
ci: sync v1 release branch on each new release (#366)
1 parent b971f66 commit f04bbfc

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/sync.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Sync Release Branch
2+
3+
on:
4+
release:
5+
types:
6+
- created
7+
8+
jobs:
9+
sync-release-branch:
10+
runs-on: ubuntu-latest
11+
if: startsWith(github.event.release.tag_name, 'v1')
12+
steps:
13+
- name: Check out the repo
14+
uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
17+
ref: v1
18+
19+
- name: Configure Git
20+
run: |
21+
git config user.name github-actions[bot]
22+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
23+
24+
- name: Sync Release Branch
25+
run: |
26+
git fetch --tags
27+
git checkout v1
28+
git reset --hard ${GITHUB_REF}
29+
git push --force

0 commit comments

Comments
 (0)