Automate npm trusted publishing setup via npm trust CLI#643
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Update workflows and documentation to use `npm trust github` (available in npm >= 11.10.0, from npm/cli#8899) instead of requiring manual web UI configuration on npmjs.com. Changes: - setup-trusted-publish.yml: Add OTP input and `npm trust github` step to automatically configure trusted publishing after package creation - turbo/generators/config.ts: Simplify setup instructions with CLI command - README.todo.md.hbs: Replace manual web UI steps with CLI command - CONTRIBUTING.md: Update both new and existing package sections - AGENTS.md: Update trusted publishing quick reference Co-authored-by: stipsan <81981+stipsan@users.noreply.github.com>
npm trust CLI
Co-authored-by: stipsan <81981+stipsan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates the repository’s trusted publishing setup guidance to use the new npm trust github CLI flow (npm >= 11.10.0), replacing most manual npmjs.com UI steps with a single command while keeping a manual fallback.
Changes:
- Updated scaffolding instructions/templates to lead with
npm trust github <package> --file=release.yml --repository=sanity-io/plugins. - Updated contributor/agent docs to reflect the CLI-first flow, with manual UI steps moved under
<details>. - Updated the “setup-trusted-publish” workflow to echo the CLI command after creating the initial package.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
turbo/generators/templates/README.todo.md.hbs |
CLI-first trusted publishing instructions for generated plugin TODO README, with manual fallback in <details>. |
turbo/generators/config.ts |
Simplifies generator “package doesn’t exist yet” instructions to point to npm trust github. |
CONTRIBUTING.md |
Updates new/existing package guidance to use npm trust github, preserves manual fallback in <details>. |
AGENTS.md |
Updates trusted publishing quick reference to use the CLI command. |
.github/workflows/setup-trusted-publish.yml |
Adds a post-step that prints the npm trust github command to run locally. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
npm/cli#8899 shipped
npm trustin npm 11.10.0, enabling CLI-based trusted publishing configuration. This replaces the manual npmjs.com web UI steps with a single command:Workflow (
setup-trusted-publish.yml)npm trust githubCLI command for the user to run locally after the package is created on npmGenerator & templates
turbo/generators/config.ts: SimplifiedgetSetupInstructions()— workflow steps streamlined, with CLI command replacing the 6-step manual web UI flowREADME.todo.md.hbs: CLI command is primary instruction; manual web UI preserved in a collapsible<details>blockDocumentation
CONTRIBUTING.md: Both "new package" and "existing package" sections updated to lead with CLI commandAGENTS.md: Trusted publishing quick reference updatedOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.