Skip to content

Commit 2341296

Browse files
committed
feat: automate major version tagging
1 parent a9c05fe commit 2341296

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/release_please.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,16 @@ jobs:
2020
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
2121
manifest-file: ".release-please-manifest.json"
2222
config-file: ".release-please-config.json"
23+
24+
- name: Checkout code
25+
if: ${{ steps.release-please.outputs.release_created }}
26+
uses: actions/checkout@v4
27+
28+
- name: Update major version tag
29+
if: ${{ steps.release-please.outputs.release_created }}
30+
run: |
31+
VERSION=${{ steps.release-please.outputs.major }}
32+
git config user.name "github-actions[bot]"
33+
git config user.email "github-actions[bot]@users.noreply.github.com"
34+
git tag -fa "v${VERSION}" -m "Update v${VERSION} to ${{ steps.release-please.outputs.tag_name }}"
35+
git push origin "v${VERSION}" --force

0 commit comments

Comments
 (0)