Switch npm publish to OIDC Trusted Publisher#31
Open
lukaskroepfl wants to merge 1 commit into
Open
Conversation
The @bitmovin/cli npm package is now configured with a Trusted Publisher binding to bitmovin/cli :: pack.yml (OIDC). Replace the long-lived NPM_TOKEN auth on the publish-npm job with the OIDC flow: - Add permissions: id-token: write so the workflow can mint an OIDC token - Drop NODE_AUTH_TOKEN and setup-node's registry-url (no .npmrc auth needed) - Upgrade npm to >= 11.5.1 (Node 20 ships with an older npm) - Publish with --provenance for sigstore-attested provenance Also remove the daily NPM_TOKEN expiry-check workflow and the expiry tracker file — neither is needed with ephemeral OIDC tokens. Manual follow-ups for a maintainer: - Delete the NPM_TOKEN repo secret - Revoke the legacy granular token on npmjs.com Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
The
@bitmovin/clipackage is now configured with an npm Trusted Publisher binding tobitmovin/cli :: pack.yml(OIDC). This PR makespack.ymlactually use that — switching from the long-livedNPM_TOKENgranular token to short-lived OIDC tokens minted by GitHub Actions.Changes
pack.yml :: publish-npmpermissions.id-token: writeso the workflow can mint an OIDC token for the npm registry to verify against the Trusted Publisher binding.NODE_AUTH_TOKEN: secrets.NPM_TOKENandsetup-node'sregistry-url:— no.npmrcauth token needed under OIDC.npm install -g npm@latest— Node 20 ships an npm older than the 11.5.1 needed for Trusted Publisher support.npm publish --provenance --access publicfor sigstore-attested provenance..github/workflows/check-npm-token.ymland.github/npm-token-expiry.txt. The daily rotation-reminder workflow and the expiry tracker are obsolete once tokens are ephemeral.Manual follow-ups (post-merge)
NPM_TOKENrepo secret in Settings → Secrets and variables → Actions.Test plan
v*tag push: thepublish-npmjob authenticates via OIDC and publishes@bitmovin/clito npm with provenance (visible on the package page on npmjs.com).NPM_TOKENreference anywhere in the workflows (grep clean).