ci: publish prereleases to their own dist-tag, never latest - #317
Merged
Conversation
Both release pipelines (GitHub Actions + Coding CI) hard-coded `npm publish` with no --tag, so npm's default sent every build — prerelease versions included — to the `latest` dist-tag. That is the tag the CLI's auto-update check reads (src/update.ts), so pushing a `vX.Y.Z-beta.N` tag would have force-fed the beta to every user. Derive the dist-tag from the version string instead: a prerelease (e.g. 0.21.0-beta.0 -> beta, 0.22.0-rc.1 -> rc) publishes to its own channel; a plain release still goes to `latest`. GitHub Releases for prereleases are now flagged as pre-release. Document the beta flow in CLAUDE.md.
jeff-r2026
force-pushed
the
worktree-beta-prerelease-ci
branch
from
August 24, 2026 11:37
a32274e to
e81c15b
Compare
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.
Problem
Both release pipelines run
npm publishwith no--tag, so npm defaults tolatest— regardless of whether the version has a prerelease suffix. That means pushing avX.Y.Z-beta.Ntag would publish the beta to thelatestdist-tag, which is exactly the tag the CLI's auto-update check reads (src/update.ts→npm view teamai-cli version). Every user would be auto-updated to a beta..github/workflows/release.yml:51—npm publish --provenance --access public.coding-ci.yaml:100—npm publish --registry http://r.tnpm.oa.comFix
Derive the dist-tag from the version string in both pipelines:
0.21.0-beta.0→beta,0.22.0-rc.1→rc,1.0.0-alpha.3→alpha0.21.0→latest(unchanged behavior for real releases)betaGitHub Releases for prereleases are now flagged
prerelease: true. Documented the beta flow inCLAUDE.md.This unblocks cutting
v0.21.0-beta.0without pollutinglatestauto-update.Test Plan
python3 -c 'yaml.safe_load(...)'on both YAML files — parse OK0.21.0-beta.0/0.21.0/0.22.0-rc.1/1.0.0-alpha.3— resolves tobeta/latest/rc/alpharespectivelyv0.21.0-beta.0tag push (CI-only change; cannot be exercised without a tag build)