fix(release): use bare_version for prerelease flag (tray- prefix has a dash)#104
Open
ntatschner wants to merge 1 commit into
Open
fix(release): use bare_version for prerelease flag (tray- prefix has a dash)#104ntatschner wants to merge 1 commit into
ntatschner wants to merge 1 commit into
Conversation
…dash) Every tray release since the release-tracks split (PR #91) was silently mis-flagged as 'pre-release' on the GitHub Releases page. Root cause: 'prerelease: ${{ contains(github.ref_name, '-') }}'. The check was designed for the pre-split 'vX.Y.Z[-channel.N]' tag schema where only pre-releases contained a hyphen. Post-split, the tag is 'tray-vX.Y.Z[-channel.N]' — the 'tray-' prefix itself contains a hyphen, so contains() returned true for EVERY tray release including bare-semver live ones. Consequence: the 'Latest' badge on GitHub's releases page stayed on the last correctly-flagged pre-split release ('v1.8.3', from 2026-05-23) all the way through tray-v1.8.5 and tray-v1.8.6 live cutovers. Users browsing the public releases page saw v1.8.3 as latest, with tray-v1.8.6 buried under the pre-release section. Fix: use needs.validate-tag.outputs.bare_version, which is the semver part with both 'tray-' AND leading 'v' stripped. Live releases produce '1.8.6' (no hyphen), pre-releases produce '1.8.6-rc.1' (hyphen). Also fixed manually outside this PR: gh release edit tray-v1.8.6 --prerelease=false --latest=true gh release edit tray-v1.8.5 --prerelease=false so the public Releases page shows the correct Latest badge now. The intervening pre-release tags stay flagged correctly. Surfaced 2026-05-24 by user observing 'the tray didnt get a release' on the GitHub UI after the v1.8.6 live cutover.
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.
Summary
Every tray release since the release-tracks split (PR #91) was silently flagged as
isPrerelease: trueon GitHub's Releases page — including bare-semver live releases. The "Latest" badge stayed on the pre-splitv1.8.3until I manually correctedtray-v1.8.6outside this PR.Root cause
release.ymlline 380:This was designed for the pre-split
vX.Y.Z[-channel.N]tag schema, where only pre-releases contained a hyphen. After PR #91 changed the tag schema totray-vX.Y.Z[-channel.N], thetray-prefix itself contains a hyphen — socontains(...)returnedtruefor every tray release including bare-semver live ones.CI green throughout (the flag is a property of the published release, not a build error), so the bug never tripped any automated check.
Fix
Use
needs.validate-tag.outputs.bare_version—validate-tagalready strips bothtray-and the leadingvfor the manifest generator, and exposes the result as an output. The bare version is1.8.6for live (no hyphen → not prerelease) and1.8.6-rc.1for rc (hyphen → prerelease). One-line check, same semantics as the original intent.Already corrected outside this PR
So your public Releases page now shows
tray-v1.8.6as Latest. The intervening pre-release tags stay flagged correctly. Verified viagh api repos/.../releases/latest.Test plan
tray-v1.8.7-alpha.1from auto-alpha after merge) publishes withisPrerelease: true— correcttray-v1.8.7) publishes withisPrerelease: falseAND becomes the new "Latest" — correct