Skip to content

fix(release): use bare_version for prerelease flag (tray- prefix has a dash)#104

Open
ntatschner wants to merge 1 commit into
nextfrom
fix/release-prerelease-flag
Open

fix(release): use bare_version for prerelease flag (tray- prefix has a dash)#104
ntatschner wants to merge 1 commit into
nextfrom
fix/release-prerelease-flag

Conversation

@ntatschner
Copy link
Copy Markdown
Collaborator

Summary

Every tray release since the release-tracks split (PR #91) was silently flagged as isPrerelease: true on GitHub's Releases page — including bare-semver live releases. The "Latest" badge stayed on the pre-split v1.8.3 until I manually corrected tray-v1.8.6 outside this PR.

Root cause

release.yml line 380:

prerelease: ${{ contains(github.ref_name, '-') }}

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 to 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.

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_versionvalidate-tag already strips both tray- and the leading v for the manifest generator, and exposes the result as an output. The bare version is 1.8.6 for live (no hyphen → not prerelease) and 1.8.6-rc.1 for rc (hyphen → prerelease). One-line check, same semantics as the original intent.

Already corrected outside this PR

gh release edit tray-v1.8.6 --prerelease=false --latest=true
gh release edit tray-v1.8.5 --prerelease=false

So your public Releases page now shows tray-v1.8.6 as Latest. The intervening pre-release tags stay flagged correctly. Verified via gh api repos/.../releases/latest.

Test plan

  • release.yml YAML parses cleanly
  • Next tray pre-release tag (e.g. tray-v1.8.7-alpha.1 from auto-alpha after merge) publishes with isPrerelease: true — correct
  • Next tray live tag (e.g. tray-v1.8.7) publishes with isPrerelease: false AND becomes the new "Latest" — correct

…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant