Skip to content

Use isolated npm trusted publishing for releases - #357

Draft
michaelrhughes wants to merge 1 commit into
masterfrom
mhughes/trusted-npm-publishing
Draft

michaelrhughes wants to merge 1 commit into
masterfrom
mhughes/trusted-npm-publishing

Conversation

@michaelrhughes

Copy link
Copy Markdown

Replace NPM_TOKEN authentication with npm trusted publishing. A read-only job builds and packs the release; a separate job has OIDC permission and publishes the tarball without installing dependencies or executing lifecycle scripts. Release dispatches must target a tag. Actions, runner versions, and the OIDC-capable Node version are pinned, and checkout credentials are not persisted.

Before enabling: an npm package owner must configure the trusted publisher for @shopify/restyle as Shopify / restyle / release.yml, with no environment name. After verifying the first OIDC release, revoke the old npm token and delete the Actions secret. These administrative steps are documented in CONTRIBUTING.md; this PR does not perform them.

Validated the build, all 44 tests, package creation, a token-free npm publish --dry-run --ignore-scripts, and actionlint. The changelog is updated. No package was published, and the GitHub-to-npm OIDC exchange cannot be verified locally; keeping this draft until the trusted publisher is configured.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant