Skip to content

Commit bac7ac2

Browse files
Armin BecherArmin Becher
authored andcommitted
chore: add tag for major version for easier tagging
1 parent 88c9db0 commit bac7ac2

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright (c) 2021 Vincent A. Cicirello
2+
# MIT License
3+
4+
name: Update Major Release Tag
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
movetag:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Get major version num and update tag
18+
run: |
19+
VERSION=${GITHUB_REF#refs/tags/}
20+
MAJOR=${VERSION%%.*}
21+
git config --global user.name 'YOUR NAME HERE'
22+
git config --global user.email '[email protected]'
23+
git tag -fa "${MAJOR}" -m 'Update major version tag'
24+
git push origin "${MAJOR}" --force

0 commit comments

Comments
 (0)