feat: add automatic major version tag update to release workflow#120
Merged
feat: add automatic major version tag update to release workflow#120
Conversation
## What Added an `update_major_tag` job to the reusable release workflow that force-updates the major version tag (e.g., `v1`) to point at the latest full semver tag (e.g., `v1.2.3`) after each release. This is controlled by a new `update-major-tag` boolean input that defaults to `true`. ## Why Consumers of this reusable workflow previously had to implement major version tag updates themselves in their own release workflows. By embedding this directly in the reusable workflow, all consuming repos get this behavior automatically without duplicating workflow code. ## Notes - Defaults to `true`, so all existing consumers will start getting major tag updates on their next release — this is intentional but worth communicating - Consumers can opt out by passing `update-major-tag: false` - Uses `persist-credentials: false` with explicit `GITHUB_TOKEN` env var for git push auth, matching the pattern used in the existing `major-version-updater.yaml` workflow - The calling workflow must have `contents: write` permission for the force-push to succeed (already required by the `create_release` job) Signed-off-by: jmeridth <jmeridth@gmail.com>
Signed-off-by: jmeridth <jmeridth@gmail.com>
Collaborator
Author
|
Testing this on another repo. Got an error. Please do not merge. |
Signed-off-by: jmeridth <jmeridth@gmail.com>
Collaborator
Author
|
Successful test. This is ready to review, merge, and release. I'll update all repos that use this and remove manual major-version-updater job from stale-repos. |
Signed-off-by: jmeridth <jmeridth@gmail.com>
Signed-off-by: jmeridth <jmeridth@gmail.com>
zkoppert
approved these changes
Mar 20, 2026
Contributor
zkoppert
left a comment
There was a problem hiding this comment.
Looks good! Should we add a breaking or major label on it?
Collaborator
Author
Great question. As this is something that doesn't break anything for the user and just adds a tag, I'm good with a minor update (so |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Added an
update_major_tagjob to the reusable release workflow that force-updates the major version tag (e.g.,v1) to point at the latest full semver tag (e.g.,v1.2.3) after each release. Controlled by a newupdate-major-tagboolean input that defaults totrue.Why
Consumers of this reusable workflow previously had to implement major version tag updates themselves in their own release workflows. Embedding this directly means all consuming repos get this behavior automatically without duplicating workflow code.
Notes
true, so all existing consumers will start getting major tag updates on their next release — worth communicating this in release notesupdate-major-tag: falsepersist-credentials: trueto ensure the username and credentials are available to thegit pushof the new tagGITHUB_TOKENenv var approach works withpersist-credentials: falsefor force-pushing tags — the existingmajor-version-updater.yamluses this same pattern but may not have been exercised recently