Skip to content

fix(release-mcp): write the npm token where pnpm publish reads it - #167

Merged
hectorpalmatellez merged 1 commit into
mainfrom
fix/release-mcp-npm-auth
Dec 6, 2026
Merged

hectorpalmatellez merged 1 commit into
mainfrom
fix/release-mcp-npm-auth

Conversation

@hectorpalmatellez

Copy link
Copy Markdown
Member

The first Release MCP dispatch (#164) failed at the publish step:

[E404] 404 Not Found - PUT https://registry.npmjs.org/@devschile%2fchucao-mcp

Every earlier step passed — library check, build, check:bin, tests — so the package and its packed @devschile/chucao dependency were correct. The token simply never reached npm.

Cause

release.yml documents this exact failure in a comment: setup-node writes the token to $NPM_CONFIG_USERCONFIG (under $RUNNER_TEMP), but a publish run from a subdirectory did not pick it up, and npm treated the PUT as anonymous. release.yml works because it also writes //registry.npmjs.org/:_authToken to $HOME/.npmrc. release-mcp.yml did not.

Change

  • Write the token to $HOME/.npmrc before pnpm publish, matching release.yml.
  • Run npm whoami first, so a bad or missing token fails as an auth error instead of a misleading 404.

The library 2.13.0 released successfully from main and its tarball carries the 42 component readmes and both token files, so once this lands the MCP dispatch should publish.

The first Release MCP dispatch failed at publish with
`[E404] 404 Not Found - PUT https://registry.npmjs.org/@devschile%2fchucao-mcp`.
Every earlier step passed, so the build and the packed dependency were
fine: the token never reached npm and the PUT was rejected.

release.yml already documents this shape. `setup-node` writes the token to
$NPM_CONFIG_USERCONFIG under $RUNNER_TEMP, but `pnpm publish` runs from
packages/chucao-mcp and did not inherit it, so write //registry.npmjs.org/
to $HOME/.npmrc before publishing, as release.yml does. `npm whoami` runs
first so a bad token fails with an auth error instead of a confusing 404.
@hectorpalmatellez
hectorpalmatellez merged commit 1bf1ec9 into main Dec 6, 2026
4 checks passed
@hectorpalmatellez
hectorpalmatellez deleted the fix/release-mcp-npm-auth branch December 6, 2026 14:19
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