[FSSDK-12891] Switch npm publishing to OIDC trusted publishing#1169
Open
FarhanAnjum-opti wants to merge 5 commits into
Open
[FSSDK-12891] Switch npm publishing to OIDC trusted publishing#1169FarhanAnjum-opti wants to merge 5 commits into
FarhanAnjum-opti wants to merge 5 commits into
Conversation
FarhanAnjum-opti
force-pushed
the
farhan/FSSDK-12891-trusted-publishing
branch
from
July 17, 2026 16:03
ef21d52 to
f036634
Compare
Replace long-lived NPM_PUBLISH_TOKEN with OIDC trusted publishing for more secure, tokenless CI publishing to npm. Workflow changes: - Add id-token: write permission for OIDC token generation - Move permissions to workflow level (add packages: write for GHR) - Add GitHub environment gate (npm) for deployment protection - Upgrade setup-node to v4 and Node to 22 (npm 11.5.1+ requirement) - Add npm upgrade step to ensure OIDC support - Remove NPM_PUBLISH_TOKEN from npm publish step (OIDC replaces it) publish.sh changes: - Make NODE_AUTH_TOKEN optional in curl lookup (public packages don't need auth for registry reads) - Add --provenance flag for npm registry publishes (supply-chain attestations, not supported by GHR) GHR publish step is unchanged — still uses GITHUB_TOKEN. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
FarhanAnjum-opti
force-pushed
the
farhan/FSSDK-12891-trusted-publishing
branch
from
July 17, 2026 16:23
f036634 to
89d0741
Compare
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.
Summary
NPM_PUBLISH_TOKENwith OIDC trusted publishing for tokenless, more secure CI publishingactions/setup-nodeto v4 and Node to 22 (npm 11.5.1+ required for OIDC)--provenanceflag for supply-chain attestationsnpmenvironment gate for deployment protection (branch restrictions + required reviewers)Changes
permissions: id-token: write, contents: readactions/setup-node@v3→v4node-version: 18→22npm install -g npm@lateststepNODE_AUTH_TOKEN/NPM_PUBLISH_TOKENreferences--provenanceflag tonpm publishenvironment: npm--provenanceis incompatible with--dry-runPrerequisites (already done)
@optimizely/optimizely-sdknpmcreated with required reviewers and branch restrictionsTest plan
workflow_dispatchon this branch to verify OIDC handshake works (dry run)NPM_PUBLISH_TOKENsecret and switch npm package settings to "disallow tokens"References
🤖 Generated with Claude Code