Skip to content

fix(release): mark hyphen-suffixed tags as prerelease#91

Merged
Alezander9 merged 1 commit into
mainfrom
fix/release-prerelease-tags
May 23, 2026
Merged

fix(release): mark hyphen-suffixed tags as prerelease#91
Alezander9 merged 1 commit into
mainfrom
fix/release-prerelease-tags

Conversation

@Alezander9
Copy link
Copy Markdown
Member

@Alezander9 Alezander9 commented May 23, 2026

Summary

  • Workflow now creates hyphen-suffixed tags (vX.Y.Z-rc<N>, -beta<N>, -alpha<N>) with --prerelease instead of --latest.
  • Bare semver (vX.Y.Z) continues to get --latest.
  • Doc-comment at the top of the file documents the convention.

Why

v0.1.9-rc2 was created by this workflow as a stable --latest release because the only path through the script was gh release create ... --latest with no prerelease branch. bcode.sh/install queries GitHub's /releases/latest, which returns the highest non-prerelease release with latest=true — so an RC became the default install target. A user reported running the one-liner and getting v0.1.9-rc2.

Earlier RCs (rc1, all v0.1.8-rc*) only avoided this because someone manually pre-created the GitHub Release with --prerelease before pushing the tag; the workflow's existing gh release view check then skipped its own create. For rc2 nobody did the manual prep, the workflow created it itself, and it landed as stable.

OpenCode avoids this entirely by publishing betas to a separate repo (anomalyco/opencode-beta). We ship everything to one repo and rely on the prerelease flag, so the flag needs to be right by default.

Fix shape

  • One if [[ "$TAG" == *-* ]] branch in the Ensure GitHub Release exists step.
  • Existing-release flags are not touched on re-run; fix manually via gh release edit if needed.
  • Doc-comment updated to spell out the convention.

Out of scope

  • OPENCODE_CHANNEL is still latest for both stable and prerelease — not relevant to install resolution.
  • Retroactive flip of v0.1.9-rc2 already done out-of-band (gh release edit v0.1.9-rc2 --prerelease --latest=false), so /releases/latest returns v0.1.8 again.

Summary by cubic

Mark hyphen-suffixed tags (like vX.Y.Z-rcN, -betaN, -alphaN) as GitHub prereleases and keep bare semver tags (vX.Y.Z) as latest. This prevents RC/beta releases from being returned by /releases/latest and installed by default.

  • Bug Fixes
    • In “Ensure GitHub Release exists”, create with --prerelease if $TAG contains a hyphen; otherwise use --latest.
    • Skip changing flags if a release already exists; fix manually with gh release edit if needed.
    • Added a doc comment outlining tag conventions and how flags are set.

Written for commit b5b8d01. Summary will update on new commits. Review in cubic

Tags like `v0.1.9-rc2` and `v0.2.0-beta1` were being created as stable
`--latest` releases, which made them the default install target for
`bcode.sh/install`. The script queries GitHub's `/releases/latest` API,
which returns the newest release with `latest=true` and `prerelease=false`
— exactly what we were producing.

Earlier RCs only avoided this by being manually pre-created with
`--prerelease` before the tag push, so the workflow's `gh release view`
check found an existing release and skipped its own `create`. For
`v0.1.9-rc2` nobody did the manual prep and the workflow created it as
stable `--latest`.

Now: if the tag contains a hyphen, create with `--prerelease` (not
`--latest`). Bare semver tags continue to use `--latest`. Existing
releases are not touched on re-run; fix them with `gh release edit`.

OpenCode avoids this entirely by publishing betas to a separate repo
(`anomalyco/opencode-beta`); we ship everything to one repo and rely on
flags, so the flags need to be right.
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Re-trigger cubic

@Alezander9 Alezander9 merged commit f52f3ae into main May 23, 2026
3 checks passed
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