Skip to content

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

Merged
joeblau merged 1 commit into
mainfrom
cursor/npm-token-mac-mini-publish-94bb
Oct 18, 2026
Merged

joeblau merged 1 commit into
mainfrom
cursor/npm-token-mac-mini-publish-94bb

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 tradeoff as bloxwap/font#14.

Every job in this repo was already on the Mac minis (runs-on: [self-hosted, macOS, ARM64], runner group JWS). The remaining problem was the publish job still using OIDC (id-token: write and npm publish --provenance), which npm does not support on self-hosted runners.

What changed

  • publish authenticates with NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} from the org-level NPM_TOKEN secret (granular, publish rights for @bloxwap packages, already shared with the open-source repos).
  • id-token: write is removed from the npm publish job. GitHub Pages deploy still uses OIDC.
  • npm publish no longer passes --provenance.
  • check-publish-auth.mjs runs before publish (whoami + collaborator write access) and never prints the token. The fail-closed unit test runs in Tests and in release validation.
  • Registry smoke still checks metadata, dist-tag, tarball identity, and packed consumers. It no longer requires SLSA provenance attestations, which token publish cannot produce.
  • No Tests or Documentation check is skipped or weakened.

Docs

docs/ci-runners.md, .github/RELEASING.md, and the public releasing page now say publish uses NPM_TOKEN without provenance.

Do not merge until Tests and Documentation are green.

Open in Web Open in Cursor 

npm trusted publishing does not support self-hosted runners, so authenticate
the existing Mac mini publish job with the org-level NPM_TOKEN secret and drop
OIDC trusted publishing and automatic provenance.

Co-authored-by: Joe Blau <[email protected]>
@joeblau
joeblau marked this pull request as ready for review October 18, 2026 17:40
@joeblau
joeblau merged commit 8b1ab57 into main Oct 18, 2026
5 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