Skip to content

Commit

Permalink
fix tag parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
jetersen committed Jan 16, 2022
1 parent 91752be commit c8c3c53
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ jobs:
- name: version
id: version
run: |
version=${{ github.event.release.tag_name }}
version=${version#v}
tag=${GITHUB_REF/refs\/tags\//}
version=${tag#v}
major=${version%%.*}
echo "::set-output name=tag::${tag}"
echo "::set-output name=version::${version}"
echo "::set-output name=major::${major}"
Expand All @@ -56,5 +57,5 @@ jobs:

- name: force update major tag
run: |
git tag v${{ steps.version.outputs.major }} ${{ github.event.release.tag_name }} -f
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 c8c3c53

Please sign in to comment.