Repository navigation
Update workflows for Npm trusted publishing - #81
Merged
Merged
Conversation
acutmore
force-pushed
the
npm-trusted-publishing
branch
from
November 18, 2026 17:10
96a1bd4 to
458f95d
Compare
Grant `id-token: write` so npm can authenticate with GitHub's OIDC token, and drop the NPM_TOKEN secret. Use Node 24, because trusted publishing needs npm >= 11.5.1 and Node 20 and 22 bundle npm 10. Trusted publishing also generates provenance automatically. The permissions, action versions and disabled cache follow npm's example workflow. Run gen-types and build as explicit steps, so that a publish with lifecycle scripts disabled (ignore-scripts) can't skip `prepack` and publish a package without `out/`. Signed-off-by: aclaymore <aclaymore@bloomberg.net>
Match publish.yml, so that CI exercises the same action versions that the publish workflow uses. Signed-off-by: aclaymore <aclaymore@bloomberg.net>
acutmore
force-pushed
the
npm-trusted-publishing
branch
from
November 18, 2026 17:11
458f95d to
9b1c963
Compare
tchetwin
reviewed
Nov 22, 2026
Comment on lines
+24
to
+26
| # Build explicitly so publishing doesn't depend on lifecycle scripts (e.g. ignore-scripts) | ||
| - run: npm run gen-types | ||
| - run: npm run build |
Collaborator
There was a problem hiding this comment.
"My" "research" suggests that in npm 12 npm publish will continue to run (unless ignore-scripts=true is explicitly set somewhere).
By contrast, npm ci will require allow-listed pre/postinstalls.
Consequently I think these lines are just achieving duplication of the run scripts with no added security benefit
Collaborator
Author
There was a problem hiding this comment.
Yeah it's not a security thing, it's just belt and braces that we build.
The build is so cheap, doing it twice seems better than zero.
Collaborator
There was a problem hiding this comment.
If we want to be explicit we may as well do NPM_CONFIG_IGNORE_SCRIPTS: "true" and get both the ~security-benefit and avoid any potential non-idempotence of the scripts
Signed-off-by: aclaymore <aclaymore@bloomberg.net>
acutmore
force-pushed
the
npm-trusted-publishing
branch
from
November 23, 2026 10:16
a624010 to
8279674
Compare
tchetwin
approved these changes
Nov 23, 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.
Updates the workflow as per https://docs.npmjs.com/trusted-publishers