Skip to content

chore: switch to npm trusted publisher with OIDC provenance#162

Merged
robertsLando merged 4 commits intomainfrom
chore/trusted-publisher
Apr 1, 2026
Merged

chore: switch to npm trusted publisher with OIDC provenance#162
robertsLando merged 4 commits intomainfrom
chore/trusted-publisher

Conversation

@robertsLando
Copy link
Copy Markdown
Member

Summary

  • Update release workflow to use id-token: write for npm OIDC authentication (trusted publishers)
  • Remove NPM_TOKEN secret dependency — auth is now handled via OIDC
  • Add provenance: true to publishConfig in package.json and --provenance to release-it publishArgs
  • Upgrade workflow to Node 22, actions/checkout@v6, actions/setup-node@v6
  • Use GH_TOKEN PAT for checkout/push to bypass branch protection

Prerequisites

  • Configure trusted publisher on npmjs.com for @yao-pkg/pkg-fetch → link to yao-pkg/pkg-fetch repo + release-it.yml workflow
  • Create a GH_TOKEN repository secret with a PAT that has push access

Test plan

  • Verify trusted publisher is configured on npmjs.com
  • Verify GH_TOKEN secret is set in repo settings
  • Trigger the workflow manually with patch and confirm it publishes with provenance

🤖 Generated with Claude Code

robertsLando and others added 4 commits March 31, 2026 18:15
- Update release workflow to use id-token:write for OIDC auth
- Remove NPM_TOKEN dependency in favor of trusted publishers
- Add provenance to publishConfig and release-it publishArgs
- Upgrade to Node 22, actions/checkout@v6, actions/setup-node@v6
- Use GH_TOKEN PAT for push access through branch protection

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replace publishArgs --provenance with skipChecks: true (OIDC handles provenance automatically)
- Remove publishConfig.provenance from package.json (not needed)
- Add registry-url to setup-node step

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Aligns with zwave-js-ui trusted publisher setup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@robertsLando robertsLando merged commit 856af59 into main Apr 1, 2026
3 checks passed
@robertsLando robertsLando deleted the chore/trusted-publisher branch April 1, 2026 07:16
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