Skip to content

Conversation

outslept
Copy link

@outslept outslept commented Sep 17, 2025

This PR edits your workflow to switch to Trusted Publishing. It lets your CI mint short‑lived OIDC ID tokens (permissions: id-token: write) that npm exchanges for publish credentials at runtime, eliminating the need for long‑lived npm tokens in CI. npm CLI 11.5.1+ is required for OIDC support.

Context:

https://github.blog/changelog/2025-07-31-npm-trusted-publishing-with-oidc-is-generally-available

https://docs.npmjs.com/trusted-publishers

e18e/ecosystem-issues#201

Also. If it is already not set, please switch the package's Publishing Access radio button to "Require two-factor authentication and disallow tokens".

@outslept outslept requested a review from a team as a code owner September 17, 2025 01:01

# Upgrade npm for trusted publishing
- name: Setup npm for publishing
run: npm install -g npm@latest
Copy link
Author

Choose a reason for hiding this comment

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

A possible alternative to npm install -g npm@latest might be to use node-version: 24, which provides npm 11.6.0 and therefore support for trusted publishing. This approach should also help prevent breaking changes creeping in, e.g. it won't introduce npm 12

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