Skip to content

fix(ci): release.yml prerelease flag broken by tray- prefix#124

Open
ntatschner wants to merge 2 commits into
nextfrom
fix/release-prerelease-flag-tray-prefix
Open

fix(ci): release.yml prerelease flag broken by tray- prefix#124
ntatschner wants to merge 2 commits into
nextfrom
fix/release-prerelease-flag-tray-prefix

Conversation

@ntatschner
Copy link
Copy Markdown
Collaborator

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

  • One-line YAML expression change; no behaviour difference except the corrected boolean.
  • Next live promotion (tray-v1.9.x → next bare-semver) confirms the new release lands without the Pre-release flag.

🤖 Generated with Claude Code

Nigel Tatschner 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.
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