Dynamically update the tracking tag in action#696
Merged
Conversation
* Determine tag current release format * Update found tag rather than static tag * Clearly error if the tag cannot be determined
jonabc
approved these changes
Apr 8, 2026
| env: | ||
| TAG: ${{ github.event.release.tag_name }} | ||
| run: | | ||
| MAJOR_TAG=$(echo "$TAG" | grep -oP '^v\d+') |
Member
There was a problem hiding this comment.
Probably not worth spending time on as permissions to create releases are limited and this covers the happy path. For completeness, this doesn't enforce a full semantic version string. Maybe the worst thing that happens here is that the workflow will fail if someone manually tags and creates a v4 release, on attempting to recreate the v4 tag
Contributor
Author
There was a problem hiding this comment.
Yeah, fair point. This could be better. I'm going to be cheap and merge this, then come around with a fix/improvement.
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.
We recently released version 3 of this action. That exposed that the major version tracking hasn't automatically updated, so now
v2tag is pointing tov3.0.0, a clear mistake.Reading the comments from when the workflow to move the tracking was last updated (#506), we chose to go for speed when moving from v1 -> v2. This PR updates the workflow to extract the major version dynamically, so we won't have this issue again.
This does bring up a follow up, which is what's the state of immutable releases. Perhaps we can get rid of these actions all together.