Skip to content

Commit

Permalink
Merge pull request #9 from ditkrg/add-major-tag-update
Browse files Browse the repository at this point in the history
Add workflow to update main version tag
  • Loading branch information
5h4k4r authored Mar 3, 2024
2 parents 041cc2e + e30996f commit ed63a1b
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/update-main-version.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: version
id: version
run: |
tag=${GITHUB_REF/refs\/tags\//}
version=${tag#v}
major=${version%%.*}
echo "tag=${tag}" >> $GITHUB_OUTPUT
echo "version=${version}" >> $GITHUB_OUTPUT
echo "major=${major}" >> $GITHUB_OUTPUT
- name: force update major tag
run: |
git config user.name github-actions
git config user.email [email protected]
git tag v${{ steps.version.outputs.major }} ${{ steps.version.outputs.tag }} -f
git push origin refs/tags/v${{ steps.version.outputs.major }} -f

0 comments on commit ed63a1b

Please sign in to comment.