fix(ci): release.yml prerelease flag broken by tray- prefix#124
Open
ntatschner wants to merge 2 commits into
Open
fix(ci): release.yml prerelease flag broken by tray- prefix#124ntatschner wants to merge 2 commits into
ntatschner wants to merge 2 commits into
Conversation
added 2 commits
May 27, 2026 17:19
Every tray release since v1.8.5 was wrongly flagged Pre-release in the GitHub UI, including bare-semver lives like tray-v1.8.7 and tray-v1.8.8. Root cause: the 2026-05-23 track split renamed tray tags from v1.8.x to tray-v1.8.x. The release-creation step's prerelease test was `contains(github.ref_name, '-')` — perfectly correct under the pre-split scheme where bare semver had no hyphen and prerelease suffixes added one, but silently broken the moment a literal `tray-` prefix landed in every ref name. The expression now evaluates true for every tray tag, so every release came out flagged Pre-release. Fix: test the channel tokens directly: contains(ref_name, '-alpha') || contains(ref_name, '-beta') || contains(ref_name, '-rc') This is robust against further tag-prefix changes and explicit about the closed set of pre-release channels the promote script ever produces (alpha / beta / rc). Backfix for the wrongly-flagged historical releases was applied via `gh release edit tray-v1.8.7 --prerelease=false` and `gh release edit tray-v1.8.8 --prerelease=false` separately. Reference: tracked from a comment on tray-v1.8.8 showing as "Pre-release" instead of "Latest" on the GH releases page.
prerelease and make_latest are independent flags. After today's backfix flipped tray-v1.8.7 / tray-v1.8.8 to prerelease=false, the Latest badge stayed on tray-v1.8.6 because gh release edit --prerelease doesn't touch make_latest. Set make_latest in the release-creation step too so future live promotions grab the Latest badge at creation rather than requiring a follow-up gh release edit --latest.
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 2026-05-23 track split has been wrongly flagged `Pre-release` on the GH releases page — including bare-semver lives like `tray-v1.8.7` and `tray-v1.8.8`.
Root cause: `release.yml` line 384 was:
```yaml
prerelease: ${{ contains(github.ref_name, '-') }}
```
The intent was "anything with a hyphen channel suffix is pre-release". That was correct in the pre-split world where bare semver was `v1.8.0` (no hyphen) and prereleases were `v1.8.0-beta.1` (one hyphen). The track split prefixed every tray tag with `tray-` — introducing a literal hyphen unrelated to the channel marker — and the expression has evaluated `true` for every tag since.
Fix
Match against the channel tokens explicitly:
```yaml
prerelease: ${{ contains(github.ref_name, '-alpha') || contains(github.ref_name, '-beta') || contains(github.ref_name, '-rc') }}
```
`alpha` / `beta` / `rc` is the closed set of prerelease channels `release-promote.mjs` ever produces, so this is exhaustive. Robust against any future tag-prefix change too.
Backfix for the historical releases
Applied out-of-band before this PR via:
```bash
gh release edit tray-v1.8.7 --prerelease=false
gh release edit tray-v1.8.8 --prerelease=false
```
`tray-v1.8.8` now correctly appears as Latest on the releases page.
Test plan
🤖 Generated with Claude Code