Skip to content

Commit e988b39

Browse files
authored
Update workflow to sync and verify release branch (#249)
Make sure release branch always points to latest release, and add verification for release branch after tag update. Fixes issue #246 for any users who use `@release/v2` (not recommended) instead of `@v2` (recommended).
1 parent e7f4f97 commit e988b39

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/update-major-version-tag.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,20 @@ jobs:
2525
git tag -f ${{ env.major_version }} ${{ github.event.release.tag_name }}
2626
git push origin ${{ env.major_version }} --force
2727
28+
- name: Update release/v* branch to major tag
29+
run: |
30+
git fetch origin
31+
branch_name="release/${{ env.major_version }}"
32+
git branch -f "$branch_name" ${{ env.major_version }}
33+
git push origin "$branch_name" --force
34+
2835
- name: Fetch Updated Tags
2936
run: git fetch --tags --force
3037

3138
- name: Verify Tag
32-
run: git show ${{ env.major_version }}
39+
run: git show ${{ env.major_version }}
40+
41+
- name: Verify release/v* branch
42+
run: |
43+
branch_name="release/${{ env.major_version }}"
44+
git show "$branch_name"

0 commit comments

Comments
 (0)