v2.0.0 #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Major Release Tag | |
on: | |
release: | |
types: [created] | |
jobs: | |
update-tag: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get major version num and update tag | |
run: | | |
VERSION=${GITHUB_REF#refs/tags/} | |
MAJOR=${VERSION%%.*} | |
git config --global user.name "GitHub Actions" | |
echo "Updating ${MAJOR} tag" | |
git tag -fa ${MAJOR} -m "Update major version tag" | |
git push origin ${MAJOR} --force |