Skip to content

Commit 066a59b

Browse files
authored
Merge pull request #213 from easingthemes/fix/update-major-tag-on-release
fix: update major version tag as post-release step
2 parents ffb309f + 0cffff4 commit 066a59b

2 files changed

Lines changed: 9 additions & 23 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
- name: Run Tests
2929
run: npm test --if-present
3030
- name: Release
31+
id: semantic
3132
uses: cycjimmy/semantic-release-action@v6
3233
with:
3334
semantic_version: 24
@@ -43,3 +44,11 @@ jobs:
4344
GIT_COMMITTER_NAME: github-actions
4445
GIT_COMMITTER_EMAIL: github-actions@github.com
4546
CI: true
47+
- name: Update major version tag
48+
if: steps.semantic.outputs.new_release_published == 'true'
49+
run: |
50+
MAJOR="v${{ steps.semantic.outputs.new_release_major_version }}"
51+
TAG="v${{ steps.semantic.outputs.new_release_version }}"
52+
echo "Updating $MAJOR tag to point to $TAG"
53+
git tag -f "$MAJOR" "$TAG"
54+
git push -f origin "$MAJOR"

.github/workflows/update-major-tag.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)