Skip to content

Dynamically update the tracking tag in action#696

Merged
truggeri merged 2 commits intomainfrom
truggeri/dynamic_move_tracking_tag
Apr 8, 2026
Merged

Dynamically update the tracking tag in action#696
truggeri merged 2 commits intomainfrom
truggeri/dynamic_move_tracking_tag

Conversation

@truggeri
Copy link
Copy Markdown
Contributor

@truggeri truggeri commented Apr 8, 2026

We recently released version 3 of this action. That exposed that the major version tracking hasn't automatically updated, so now v2 tag is pointing to v3.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.

* Determine tag current release format
* Update found tag rather than static tag
* Clearly error if the tag cannot be determined
@truggeri truggeri self-assigned this Apr 8, 2026
@truggeri truggeri marked this pull request as ready for review April 8, 2026 17:53
@truggeri truggeri requested a review from a team as a code owner April 8, 2026 17:53
@truggeri truggeri added enhancement New feature or request github_actions Pull requests that update GitHub Actions code labels Apr 8, 2026
Copy link
Copy Markdown
Member

@jonabc jonabc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 🚢

env:
TAG: ${{ github.event.release.tag_name }}
run: |
MAJOR_TAG=$(echo "$TAG" | grep -oP '^v\d+')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, fair point. This could be better. I'm going to be cheap and merge this, then come around with a fix/improvement.

@truggeri truggeri merged commit 64f9ebd into main Apr 8, 2026
9 checks passed
@truggeri truggeri deleted the truggeri/dynamic_move_tracking_tag branch April 8, 2026 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow latest v3 tag

2 participants