Migrate NPM publishing to OIDC trusted publishing#191
Merged
leoromanovsky merged 1 commit intomainfrom Mar 3, 2026
Merged
Conversation
Classic NPM tokens are being deprecated. This switches the release workflow to use GitHub Actions OIDC for authentication instead of the ENV_NPM_TOKEN secret. Changes: - Remove ~/.npmrc token injection and NODE_AUTH_TOKEN env from all publish steps in release.yaml - Add registry-url to setup-node for OIDC discovery - Bump yarn from 4.9.2 to 4.10.3 (minimum for OIDC support) - Add migration plan doc with manual pre/post steps
greghuels
approved these changes
Mar 2, 2026
sameerank
approved these changes
Mar 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
NPM is deprecating classic access tokens (announcement). Our release workflow currently uses the
ENV_NPM_TOKENsecret written to~/.npmrc. We need to migrate to OIDC trusted publishing per the internal migration guide.Changes
release.yaml: Remove~/.npmrctoken injection andNODE_AUTH_TOKENenv vars from all 3 publish steps. Addregistry-urltosetup-nodefor OIDC discovery.docs/npm-oidc-migration.md: Full migration plan documenting manual pre/post steps.Decisions
id-token: writeandenvironment: production— no changes needed there.--provenanceflag not added — npm trusted publishing handles attestation automatically.Pre-merge manual steps (required)
Before merging, trusted publishers must be configured on npmjs.com for all 3 packages:
@datadog/flagging-core@datadog/openfeature-browser@datadog/openfeature-node-serverSettings → Trusted Publisher → GitHub Actions → org:
DataDog, repo:openfeature-js-client, workflow:release.yaml, environment:production.Post-merge manual steps
After a successful OIDC publish:
ENV_NPM_TOKENfrom GitHub environment secrets