fix(ci): publish via npx and tag prereleases explicitly#78
Merged
Conversation
Two issues showed up running the trusted-publisher publish step:
- `npm install -g npm@latest` races against the running bundled npm
("Cannot find module 'promise-retry'") because npm tries to overwrite
its own files mid-install. Run the modern CLI via `npx` from its
separate cache instead — no self-overwrite, same OIDC behavior.
- npm 11+ refuses to publish a prerelease without `--tag`:
"You must specify a tag using --tag when publishing a prerelease
version." Derive the tag from the version's prerelease identifier
so future prereleases (e.g. `-alpha.N`) land on the matching tag
rather than getting bounced. Stable versions still publish to
`latest` (default).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
block-kitchen | 7361e4d | Commit Preview URL Branch Preview URL |
May 20 2026, 07:14 AM |
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.
Summary
Two issues blocked the publish step on top of #76:
npm install -g npm@latestrace. npm tries to overwrite its own files mid-install — the in-flight install removespromise-retryfrom the bundled@npmcli/arboristbefore the new files settle, and the still-running npm crashes withMODULE_NOT_FOUND. This is what the 0.8.1 re-run hit.npx -y npm@latest publishinstead. npx caches to~/.npm/_npx/— no self-overwrite. Same OIDC trusted-publisher behavior because the resolved CLI is the same.--tagfor prereleases. Doesn't affect0.8.1(stable), but the next time release-please cuts a-alpha.Nit will:"You must specify a tag using --tag when publishing a prerelease version."latest(default).Mirrors TightknitAI/slack-block-kit-validator#35.
Test plan
🤖 Generated with Claude Code