Skip to content

Commit c159a4b

Browse files
authored
Merge pull request #57 from IBM/release_any_version
Change release action to work on any major version
2 parents 1625680 + 12431cc commit c159a4b

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)