Skip to content

Commit 36a42a1

Browse files
authored
Merge pull request #18 from grafana/auto-move-major-tag
[feat] Add workflow to automatically move major tag on release
2 parents 5fae340 + a8b6596 commit 36a42a1

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Move Major Release Tag
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
move-major-tag:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Get major version number and update tag
15+
run: |
16+
VERSION=${GITHUB_REF#refs/tags/}
17+
MAJOR=${VERSION%%.*}
18+
git config --global user.name "${GITHUB_ACTOR}"
19+
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
20+
git tag -fa ${MAJOR} -m "Update major version tag"
21+
git push origin ${MAJOR} --force

0 commit comments

Comments
 (0)