Skip to content

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

Merged
moulibheemaneti merged 1 commit into
mainfrom
claude/trusted-publishing
Nov 11, 2026
Merged

moulibheemaneti merged 1 commit into
mainfrom
claude/trusted-publishing

Conversation

@moulibheemaneti

Copy link
Copy Markdown
Owner

Summary

@moulibheemaneti/commitguard now has a trusted publisher on npmjs.com (GitHub Actions, moulibheemaneti/commitguard, publish.yml). 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: the previous NPM_TOKEN had expired, granular tokens last at most 90 days, and npm stops direct publishing with 2FA-bypass tokens in January 2027.

The same change already published @moulibheemaneti/docfold@0.1.1 through trusted publishing (moulibheemaneti/docfold#4). npm validates a new trusted publisher on its first publish, so the next commitguard release is that check.

Checklist

  • bun test passes locally (workflow-only change)
  • bun tsc --noEmit reports no type errors (workflow-only change)
  • CHANGELOG.md updated under [Unreleased]: release-please writes it
  • Version bumped in package.json (if this is a release-worthy change): release-please does it
  • 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. The previous token had expired, and
direct publishing with granular tokens that bypass 2FA ends in January
2027.

The current Node LTS ships npm 11.20, above the 11.5.1 that trusted
publishing needs. The same change already published
@moulibheemaneti/docfold 0.1.1 through trusted publishing.

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