Skip to content

Commit

Permalink
Fix version tag issue and update workflows
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
metcalfc authored Dec 14, 2024
1 parent 06c648f commit d9667ba
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,10 @@ jobs:
name: Release ${{ github.ref }}
body: ${{ steps.changelog.outputs.changelog }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Update Major Version Tag
run: |
MAJOR_VERSION=v$(echo "${{ github.ref }}" | grep -oE '^v[0-9]+')
git tag -f $MAJOR_VERSION
git push origin $MAJOR_VERSION --force
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit d9667ba

Please sign in to comment.