Skip to content

Commit b902235

Browse files
#194 - Add support for short v1 tag (#197)
* #194 - Add support for short v1 tag - Add new workflow for automated update of v1 tag. Update will be done after release.
1 parent 1a2ea4f commit b902235

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Update v1 tag on release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
update-v1-tag:
9+
permissions:
10+
contents: write
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repo
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Set Git user
19+
run: |
20+
git config user.name "github-actions"
21+
git config user.email "[email protected]"
22+
23+
- name: Move v1 tag to this release
24+
run: |
25+
git fetch --tags
26+
COMMIT_SHA=$(git rev-list -n 1 ${{ github.event.release.tag_name }})
27+
echo "Release tag '${{ github.event.release.tag_name }}' resolves to commit $COMMIT_SHA"
28+
git tag -f v1 $COMMIT_SHA
29+
git push origin -f v1

0 commit comments

Comments
 (0)