Skip to content

Commit 3dba33d

Browse files
authored
Merge pull request #223 from I2PC/ms_dynamic_tag
Add dynamically updated major version tag
2 parents cd98116 + a95fd34 commit 3dba33d

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ jobs:
2424
with:
2525
github_token: ${{ secrets.GITHUB_TOKEN }}
2626
custom_tag: ${{ steps.variables.outputs.TAG_NAME }}
27+
28+
- name: Update major version tag
29+
run: |
30+
VERSION=${{ steps.variables.outputs.TAG_NAME }}
31+
MAJOR=${VERSION%%.*}
32+
git config --global user.name 'GitHub Actions'
33+
git config --global user.email 'action@github.com'
34+
git tag -fa "${MAJOR}" -m 'Update major version tag with $VERSION'
35+
git push origin "${MAJOR}" --force
2736
2837
- name: Create a GitHub release
2938
uses: ncipollo/release-action@main

0 commit comments

Comments
 (0)