ci: migrate npm publish to OIDC trusted publishing - #83
joaoloureirop wants to merge 4 commits into
Conversation
Upgrade action-npm-publish to v6 and Yarn 4.16 so releases can use staged OIDC publishes instead of long-lived tokens. Co-authored-by: Cursor <cursoragent@cursor.com>
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. Ignoring alerts on:
|
actions/setup-node resolves the runner's global Yarn 1 when populating the yarn cache, which now refuses to run because package.json requires Yarn 4. Also build with `yarn prepare` so the published package keeps its type declarations, and keep Yarn's hardened install defaults. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@SocketSecurity ignore npm/undici@8.10.2 Transitive tooling from the existing React Native 0.73 example stack, surfaced by the Yarn 4 lockfile rewrite. Not new direct deps and not in the published package. undici is Node's HTTP client (network + proxy env vars are its job). |
There was a problem hiding this comment.
Can you please align the workflows more with the module template?
publish-release is typically called through the main workflow, and releases are created through the create-release-pr workflow.
There was a problem hiding this comment.
Done. publish-release.yml is now a workflow_call invoked from main.yml after action-is-release, and releases are opened via create-release-pr.yml.
This repo already has Android/iOS/Detox/security workflows, so main.yml only covers the release trigger rather than duplicating the full module-template CI graph. Formatter is prettier to match this package.
Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com> Signed-off-by: João Loureiro <175489935+joaoloureirop@users.noreply.github.com>
Align the release flow with the module template: open a release PR from the Create Release Pull Request workflow, then publish when that github-actions commit lands on main. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
MetaMask/action-npm-publish@v6with OIDC (id-token: write) and staged NPM publishing.yarn --immutable.liboutput (this is a single package, not apackages/**/distmonorepo).Follow-up
@metamask/react-native-webview(workflowpublish-release.yml, environmentnpm-publish).NPM_TOKENcan be removed from thenpm-publishenvironment.Test plan
Made with Cursor