Skip to content

Switch npm publish to OIDC trusted publishers#104

Closed
clholgat wants to merge 1 commit into
mainfrom
ch/trusted-publisher
Closed

Switch npm publish to OIDC trusted publishers#104
clholgat wants to merge 1 commit into
mainfrom
ch/trusted-publisher

Conversation

@clholgat

Copy link
Copy Markdown
Collaborator

Summary

  • Remove NPM_TOKEN secret dependency from both publish jobs
  • Add --provenance flag to npm publish for OIDC-based authentication
  • Add environment: npm-publish to both publish jobs (required for OIDC token claims)

Setup required before merging

  1. npmjs.com — configure trusted publisher on both @snap/valdi and @snap/eslint-plugin-valdi:
    • Repository owner: Snapchat
    • Repository name: Valdi
    • Workflow filename: publish-npm.yml
    • Environment: npm-publish
  2. github.com/Snapchat/Valdi — create an environment named npm-publish (Settings > Environments)

Test plan

  • Create npm-publish environment on the repo
  • Configure trusted publisher on npmjs.com for @snap/valdi
  • Configure trusted publisher on npmjs.com for @snap/eslint-plugin-valdi
  • Merge and trigger a workflow_dispatch run to verify publish succeeds

🤖 Generated with Claude Code

Remove NPM_TOKEN dependency and use --provenance flag with GitHub
Actions OIDC for token-free publishing. Requires npm-publish
environment to be created on the repo and trusted publisher
configured on npmjs.com for both packages.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

📊 PR Size: size/S

Total changes: 10 lines (1 files)

Top files changed:

  • .github/workflows/publish-npm.yml: +4 -6

Size calculated as additions + deletions. Labels: XS (<10), S (<50), M (<250), L (<1000), XL (1000+)

@clholgat clholgat closed this Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants