Skip to content

Commit 381d461

Browse files
authored
chore: add sync workflow for v0 releases (#43)
add sync workflow for v0 releases
1 parent ec54886 commit 381d461

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/sync.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Sync Release Branch
2+
3+
permissions: {}
4+
5+
on:
6+
release:
7+
types:
8+
- created
9+
10+
jobs:
11+
sync-release-branch:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
if: startsWith(github.event.release.tag_name, 'v0')
16+
steps:
17+
- name: Check out the repo
18+
uses: actions/checkout@v6
19+
with:
20+
persist-credentials: true
21+
fetch-depth: 0
22+
ref: v0
23+
24+
# The email is derived from the bots user id,
25+
# found here: https://api.github.com/users/github-actions%5Bbot%5D
26+
- name: Configure Git
27+
run: |
28+
git config user.name github-actions[bot]
29+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
30+
31+
- name: Sync Release Branch
32+
run: |
33+
git fetch --tags
34+
git checkout v0
35+
git reset --hard ${GITHUB_REF}
36+
git push --force

0 commit comments

Comments
 (0)