Skip to content

ci: publish prereleases to their own dist-tag, never latest - #317

Merged
jeff-r2026 merged 1 commit into
mainfrom
worktree-beta-prerelease-ci
Aug 24, 2026
Merged

jeff-r2026 merged 1 commit into
mainfrom
worktree-beta-prerelease-ci

Conversation

@jeff-r2026

Copy link
Copy Markdown
Collaborator

Problem

Both release pipelines run npm publish with no --tag, so npm defaults to latest — regardless of whether the version has a prerelease suffix. That means pushing a vX.Y.Z-beta.N tag would publish the beta to the latest dist-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.com

Fix

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 → alpha
  • plain 0.21.0 → latest (unchanged behavior for real releases)
  • non-word / semver-looking prerelease identifiers fall back to beta

GitHub Releases for prereleases are now flagged prerelease: true. Documented the beta flow in CLAUDE.md.

This unblocks cutting v0.21.0-beta.0 without polluting latest auto-update.

Test Plan

  • python3 -c 'yaml.safe_load(...)' on both YAML files — parse OK
  • dist-tag derivation logic run against 0.21.0-beta.0 / 0.21.0 / 0.22.0-rc.1 / 1.0.0-alpha.3 — resolves to beta / latest / rc / alpha respectively
  • Real end-to-end verification happens on the actual v0.21.0-beta.0 tag push (CI-only change; cannot be exercised without a tag build)

@jeff-r2026 jeff-r2026 self-assigned this Aug 24, 2026
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
jeff-r2026 force-pushed the worktree-beta-prerelease-ci branch from a32274e to e81c15b Compare August 24, 2026 11:37
@jeff-r2026
jeff-r2026 merged commit cbf4572 into main Aug 24, 2026
7 checks passed
@jeff-r2026
jeff-r2026 deleted the worktree-beta-prerelease-ci branch August 26, 2026 06:59
Walternater pushed a commit to Walternater/teamai-cli that referenced this pull request Nov 2, 2026
)

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