ci: set up preview publishing - #474
Open
EugeneTheDev wants to merge 1 commit into
Open
Conversation
EugeneTheDev
force-pushed
the
eugenethedev/preview-registry
branch
from
September 4, 2026 14:19
96b9d9f to
86d6aa0
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.
Copy of agentclientprotocol/claude-agent-acp#1084
Today nothing reaches npm between two release-please releases, so trying a merged
but unreleased change means building from source. This adds a continuously
published preview channel.
Every CI-green push to
mainthat is not a release merge publishes<package.json version, patch bumped>-preview.Nunder thepreviewdist-tag,tags the commit
v<version>, and dispatches the same agent registry update astable release does. With
mainat 0.73.0 that gives0.73.1-preview.1,0.73.1-preview.2, and so on;Nrestarts at 1 whenever a release moves thebase.
latestis untouched.Approach
publish.ymlrather than a new workflow. npm binds a trustedpublisher to one repo + workflow filename, and a package gets only one. A
separate file would fail OIDC and cost the stable path its publisher.
CIworkflow succeeding (workflow_run), so a red commit isnever published. release-please's release merge is excluded by the head
commit's author and subject — its
releases_createdoutput is not reachablefrom a different workflow run.
Nis the max of the npm registry and local git tags. npm reservesversions forever, even after
unpublish, so a reusedNis a hard failure;but the registry is CDN-served and lags, which the tags cover. A registry read
failure aborts rather than guessing.
and would reset
Nunder already-published previews.package.jsonand the release-please manifest stay release-please's to own.--tag previewis mandatory:npm publishdefaults tolatesteven for asemver prerelease.
publish-npm-previewmirrorspublish-npmand only publishes(no repo write access);
publish-tag-previewonly tags, so a failed tag isretryable with Re-run failed jobs without re-publishing an immutable version;
trigger-registry-updateis shared with the stable path. Both downstream jobsgate on a
publishedoutput the publish step sets, not on job status — the tagpush happens after the publish, so a red job can still mean npm has the
version.
Next step
The publish is
npm publish --dry-runfor now. Theworkflow_runtrigger andthe
releaseenvironment's protected-branch policy mean this job cannot run offthe default branch at all, so merging this is the only way to exercise the
trigger, the gate and the version calculation — and with
publishedunset, therehearsal neither tags nor touches the registry.
Once one run looks right, a follow-up drops
--dry-runand addsecho "published=true" >> "$GITHUB_OUTPUT"to that step. Nothing else changes.