test: add npm OIDC perms to workflow#148
Open
Des-ava wants to merge 6 commits into
Open
Conversation
… in dev-release workflow
…jest setup, add publsh.yml and adjust actions version to v4
erictaylor
reviewed
Dec 16, 2025
erictaylor
left a comment
There was a problem hiding this comment.
High level notes on OIDC publishing:
- Permission
id-token: writeis only needed in workflows where the OIDC token is needed for publishing. That permission isn't needed otherwise, and unless its absolutely needed it shouldn't be included in the workflow. - Only a single workflow file can be used for NPM publishing via OIDC (per package). In the NPM settings for a package, you have to set the workflow file for OIDC to work. Having separate workflows for different publishing (ie main release vs canary releases etc) won't work unfortunately. It's a limitation on NPMs setup of OIDC. So your
publish.ymlworkflow anddev-release.ymlwill need consolidated into a singular workflow for publishing that conditionally does different release types based on your desired workflow heuristics. - Any workflows that are publishing via OIDC should still set a readonly NPM token during installation of packages. During a publish step, this token should not be used and OIDC would be used.
- NPM 11.5.1 or later is required for publishing via OIDC to work.
You can find all this information via:
https://docs.npmjs.com/trusted-publishers
…ssions and streamline dependency installation
Contributor
Author
|
@erictaylor Ive revised the configuration. Please let me know if this is more acceptable |
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.
No description provided.