Skip to content

ci: publish to npm with trusted publishing instead of a token - #4

Merged
moulibheemaneti merged 1 commit into
masterfrom
claude/nifty-bohr-c7zlx6
Nov 11, 2026
Merged

moulibheemaneti merged 1 commit into
masterfrom
claude/nifty-bohr-c7zlx6

Conversation

@moulibheemaneti

Copy link
Copy Markdown
Owner

Summary

@moulibheemaneti/docfold now has a trusted publisher on npmjs.com (GitHub Actions, moulibheemaneti/docfold, publish.yml, with npm publish allowed). npm can verify a publish run through GitHub's OIDC token, so the workflow no longer needs NPM_TOKEN.

  • Drop NODE_AUTH_TOKEN / NPM_TOKEN from the publish step.
  • Keep id-token: write, which trusted publishing and provenance both use, and update the comments.
  • No npm upgrade step: lts/* is Node 26.13 with npm 11.20, above the 11.5.1 that trusted publishing needs.

Why: granular tokens expire within 90 days (the last one already did), and npm stops direct publishing with 2FA-bypass tokens in January 2027.

The first real test is the next release. If that publish fails, the fix is to check the trusted publisher settings on npmjs.com, or to restore the token step.

Checklist

  • bun test passes locally (no code changes)
  • bun run typecheck reports no type errors (no code changes)
  • README updated (if this changes behaviour, config or the CLI): not needed
  • PR title follows Conventional Commits (feat:, fix:, chore:, etc.)

Generated by Claude Code

The package now has a trusted publisher on npmjs.com for this workflow,
so npm verifies the run through GitHub's OIDC token (id-token: write)
and NPM_TOKEN is no longer needed. Direct publishing with granular
tokens that bypass 2FA ends in January 2027, and the tokens expire
within 90 days.

The current Node LTS ships npm 11.20, above the 11.5.1 that trusted
publishing needs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ewn3bYVbsq8jq7B4eP2C47
@moulibheemaneti
moulibheemaneti merged commit 7812743 into master Nov 11, 2026
2 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