Skip to content

Commit bafac38

Browse files
authored
Adds workflow for updating major releases (#7)
1 parent 11740d5 commit bafac38

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/release.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Update Major Release Tag
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
update-tag:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: Get major version num and update tag
13+
run: |
14+
VERSION=${GITHUB_REF#refs/tags/}
15+
MAJOR=${VERSION%%.*}
16+
git config --global user.name "GitHub Actions"
17+
echo "Updating ${MAJOR} tag"
18+
git tag -fa ${MAJOR} -m "Update major version tag"
19+
git push origin ${MAJOR} --force

0 commit comments

Comments
 (0)