Skip to content

ci: authenticate npm publish with NPM_TOKEN on Mac minis - #56

Merged
joeblau merged 1 commit into
mainfrom
cursor/npm-token-self-hosted-publish-6474
Oct 18, 2026
Merged

joeblau merged 1 commit into
mainfrom
cursor/npm-token-self-hosted-publish-6474

Conversation

@joeblau

@joeblau joeblau commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

This drops npm trusted publishing and automatic provenance, per Joe’s decision. Official npm docs say trusted publishing supports GitHub-hosted runners only; self-hosted runners are not supported (Trusted publishing for npm packages). Same change as bloxwap/font#14.

Summary

Every CI job was already on runs-on: [self-hosted, macOS, ARM64] (runner group JWS). Nothing was left on ubuntu-latest. The remaining problem was the Publish to npm job, which still used OIDC trusted publishing (id-token: write, no token). That cannot work on these minis.

  • publish authenticates with NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} (org-level granular token, publish rights for @bloxwap packages). id-token: write is removed from that job.
  • actions/setup-node sets registry-url: https://registry.npmjs.org.
  • check-publish-auth.ts runs on every release, including when the version is already published. It checks the token (whoami + collaborator write access) and never prints it. The unit test asserts fail-closed without a token.
  • Version/tag match, skip-if-published, npm CLI >=11.5.1, prepublishOnly tests, and the public publishConfig are unchanged. No check was skipped.
  • Docs (docs/ci-runners.md, README, Releasing) record that publish uses NPM_TOKEN without provenance. Codecov and GitHub Pages still use OIDC.

actions/setup-python is unused here (and cannot install on the minis).

Checks

  • npm test and npm run coverage pass
  • npm run size stays within budget (no package size change)
  • New or changed sounds were auditioned on the docs sound board (npm run docs:dev) (N/A — no sound changes)
  • Docs updated for API changes (N/A) / releasing and runner docs updated for token publish
Open in Web Open in Cursor 

npm trusted publishing does not support self-hosted runners, so the
publish job (already on [self-hosted, macOS, ARM64]) authenticates with
the org NPM_TOKEN secret via NODE_AUTH_TOKEN instead of OIDC. That drops
automatic provenance. Keep the version/tag gate, skip-if-published check,
and prepublishOnly tests, and fail closed if the token is missing.

Co-authored-by: Joe Blau <[email protected]>
@joeblau
joeblau marked this pull request as ready for review October 18, 2026 17:46
@joeblau
joeblau merged commit 1be6630 into main Oct 18, 2026
6 checks passed
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.

2 participants