Skip to content

Commit 12431cc

Browse files
committed
Change release action to work on any major version
Signed-off-by: Jason Frey <[email protected]>
1 parent 1625680 commit 12431cc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Update the v1 branch when a release is published
1+
name: Update major version branch on release
22
on:
33
release:
44
types: [published]
@@ -13,4 +13,8 @@ jobs:
1313
- uses: actions/checkout@v5
1414
with:
1515
fetch-depth: 0
16-
- run: git push origin HEAD:v1
16+
- name: Update major version branch
17+
run: |
18+
tag=${{ github.event.release.tag_name }}
19+
branch=${tag%%.*}
20+
git push origin HEAD:$branch

0 commit comments

Comments
 (0)