Two interacting bugs produced v1.3.1-rc.4 today:
1. release-cut.yml used `gh release list --exclude-pre-releases` to
find latest_stable. That filter checks the GitHub `isPrerelease`
flag, which had been flipped to `false` on several RC releases
(including v1.3.22-rc.2 and v1.3.1-rc.3). The query returned an
RC tag, and bump() then silently mis-parsed `1.3.1-rc.3` via
`Number("1-rc") = NaN` -> `(NaN||0)+1 = 1`, yielding base=1.3.1.
Fix: filter by tag shape (no `-rc.`) in jq so an RC tag can never
be treated as stable, regardless of metadata. Also strip any
prerelease suffix in bump() and semver_gt() so the numeric math
is robust even if a caller passes a dirty input.
2. release.yml's final publish step only ran `--draft=false`, leaving
the `prerelease` flag at whatever electron-builder last wrote. When
that flag ended up false on an RC, GitHub marked the RC as the
"latest" release.
Fix: re-assert `--prerelease=<derived from tag>` alongside
`--draft=false` so the final state is a function of the tag name,
not of any intermediate publisher behavior.
Co-authored-by: Orca <help@stably.ai>