Skip to content

Enable NPM trusted publishing with OIDC#7

Open
hillna wants to merge 6 commits intodevelopfrom
nick/inf-65-update-npm-publish-workflows-to-use-trusted-publishing
Open

Enable NPM trusted publishing with OIDC#7
hillna wants to merge 6 commits intodevelopfrom
nick/inf-65-update-npm-publish-workflows-to-use-trusted-publishing

Conversation

@hillna
Copy link

@hillna hillna commented Jan 13, 2026

Summary

Update npm publish workflow to use OIDC trusted publishing with provenance.

Changes

  • Add id-token: write and contents: read permissions for OIDC authentication
  • Use yarn npm publish with --provenance flag for supply chain security
  • Upgrade to Yarn 4.12.0 for npm trusted publishing support (OIDC auth added in 4.10.0+)
  • Remove NODE_AUTH_TOKEN secret (no longer needed with OIDC)

Status

✅ Trusted publishing has been configured on npmjs.com for this package.

- Add OIDC permissions (id-token: write, contents: read) for trusted publishing
- Replace NODE_AUTH_TOKEN with npx npm@latest publish --provenance
@linear
Copy link

linear bot commented Jan 13, 2026

@hillna hillna force-pushed the nick/inf-65-update-npm-publish-workflows-to-use-trusted-publishing branch 2 times, most recently from 73b732a to d3c6baa Compare January 14, 2026 17:12
- Upgrade to Yarn 4.12.0 for OIDC support (PR yarnpkg/berry#6898)
- Replace npx npm@latest publish --provenance with yarn npm publish
- Provenance is automatic with OIDC trusted publishing
- Add packageManager field where missing
@hillna hillna force-pushed the nick/inf-65-update-npm-publish-workflows-to-use-trusted-publishing branch from d3c6baa to 3629163 Compare January 14, 2026 18:15
@hillna hillna self-assigned this Jan 14, 2026
@hillna hillna marked this pull request as ready for review January 14, 2026 18:46
@hillna hillna marked this pull request as draft January 26, 2026 21:04
Switch from yarn pack + npx npm publish to yarn npm publish for OIDC trusted publishing support.
@hillna hillna marked this pull request as ready for review January 28, 2026 21:44
@hillna hillna requested a review from jtbandes January 28, 2026 22:04
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 16.x
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😮

Copy link
Member

@jtbandes jtbandes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I'm not sure this will work since the yarn version is too old in this repo.

Yarn 4.10.0+ adds OIDC authentication support for GitHub Actions and
GitLab CI, enabling npm trusted publishing without long-lived tokens.

Co-authored-by: Cursor <cursoragent@cursor.com>
@hillna hillna marked this pull request as draft January 29, 2026 22:46
hillna and others added 2 commits January 29, 2026 17:58
Corepack must be enabled for the packageManager field to work properly.
Also updates from EOL Node.js 16 to Node.js 22.

Co-authored-by: Cursor <cursoragent@cursor.com>
The setup-node action with cache: yarn runs yarn to find the cache
directory during its own execution, so corepack must be enabled first.

Co-authored-by: Cursor <cursoragent@cursor.com>
@hillna hillna marked this pull request as ready for review January 29, 2026 23:01
@hillna hillna requested a review from jtbandes January 29, 2026 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants