diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0d7adc5..826ca20 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -378,10 +378,28 @@ jobs: tag_name: ${{ github.ref_name }} name: ${{ github.ref_name }} draft: true - # Anything with a hyphen (rc, beta, alpha, etc.) is a pre-release; - # only bare semver like tray-v0.2.0 gets marked Latest on the - # GH releases page. - prerelease: ${{ contains(github.ref_name, '-') }} + # Only bare semver (e.g. `tray-v0.2.0`) gets marked Latest on + # the GH releases page; anything with an `-alpha` / `-beta` / + # `-rc` channel suffix is a pre-release. + # + # IMPORTANT: do NOT test for a hyphen in `ref_name` — the + # post-2026-05-23 track split prefixes every tray tag with + # `tray-`, so the previous `contains(ref_name, '-')` form + # evaluated true for live tags too. Result: every release + # from tray-v1.8.5 onward was wrongly flagged Pre-release in + # the GH UI. Match against the channel tokens explicitly so + # the test is stable against any future tag-prefix change. + prerelease: ${{ contains(github.ref_name, '-alpha') || contains(github.ref_name, '-beta') || contains(github.ref_name, '-rc') }} + # `make_latest` is independent of `prerelease`. Setting it + # explicitly here so live tags grab the Latest badge at + # creation time. Without this, when a release was previously + # mis-created as prerelease and then edited to non-prerelease + # (the 2026-05-27 backfix of tray-v1.8.7 / tray-v1.8.8), the + # Latest badge stayed on the older live tag — because flipping + # `prerelease` doesn't touch `make_latest`. Quoted strings + # because the action expects "true"/"false"/"legacy", not + # YAML booleans. Mirrors the prerelease expression inverted. + make_latest: ${{ (contains(github.ref_name, '-alpha') || contains(github.ref_name, '-beta') || contains(github.ref_name, '-rc')) && 'false' || 'true' }} # `generate_release_notes: false` — our per-component changelog # in release-body.md replaces GH's auto-generated notes, which # would otherwise leak platform-only commits into the tray