Skip to content

Commit d9667ba

Browse files
authored
Fix version tag issue and update workflows
Fixes #263 Add a step to update the git tag with the major version in the `release.yml` workflow. * Add a new step "Update Major Version Tag" after the "Create Release" step * Extract the major version from the full semver string and create a new git tag with just the major version * Push the new tag to the repository using the `GITHUB_TOKEN` for authentication --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/metcalfc/changelog-generator/issues/263?shareId=XXXX-XXXX-XXXX-XXXX). Signed-off-by: GitHub <[email protected]>
1 parent 06c648f commit d9667ba

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/release.yml

+7
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,10 @@ jobs:
2525
name: Release ${{ github.ref }}
2626
body: ${{ steps.changelog.outputs.changelog }}
2727
token: ${{ secrets.GITHUB_TOKEN }}
28+
- name: Update Major Version Tag
29+
run: |
30+
MAJOR_VERSION=v$(echo "${{ github.ref }}" | grep -oE '^v[0-9]+')
31+
git tag -f $MAJOR_VERSION
32+
git push origin $MAJOR_VERSION --force
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)