Skip to content

Publish stable releases from master to the latest dist-tag#68

Open
patocallaghan wants to merge 5 commits into
masterfrom
patoc/publish-yml-shippable-dist-tag
Open

Publish stable releases from master to the latest dist-tag#68
patocallaghan wants to merge 5 commits into
masterfrom
patoc/publish-yml-shippable-dist-tag

Conversation

@patocallaghan
Copy link
Copy Markdown
Member

@patocallaghan patocallaghan commented Jun 4, 2026

Why?

Put the staged-publish workflow into its real shippable state. A package that ships stable releases from master only needs the one path: publish reviewed master code to the default latest dist-tag. The prerelease/next flow is an advanced, opt-in capability this package doesn't use, so it shouldn't be baked into the reference workflow.

How?

npm stage publish now runs with no --tag (defaults to latest), and the release-source guard refuses any release not reachable from master (the prerelease exemption is removed, so the guard applies to every release).

Generated with Claude Code

The experiment hardcoded `npm stage publish --tag next` to keep `latest`
on 1.0.2 untouched. For real releases the dist-tag should follow the
release type: stable releases go to `latest` (npm's default), prereleases
go to `next`. Use the same prerelease definition as the release-source
guard (semver hyphen) so the two stay consistent.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@patocallaghan patocallaghan marked this pull request as ready for review June 4, 2026 19:10
… path

The experiment exercised the prerelease flow (`--tag next`, cut off-branch), but
the shippable reference only needs the stable path: publish from reviewed master
to the default `latest` dist-tag. Remove the dist-tag case statement and the
source guard's prerelease exemption, so every release must be reachable from
master and lands on `latest`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@patocallaghan patocallaghan changed the title Make stage-publish dist-tag follow the release type (latest for stable, next for prerelease) Publish stable releases from master to the latest dist-tag Jun 5, 2026
patocallaghan and others added 3 commits June 5, 2026 09:52
Review nits: guard `git fetch origin master` so a transient fetch failure
exits with an explicit message rather than relying on the implicit
`--is-ancestor` non-zero exit, and collapse the redundant comment pair.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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