-
Notifications
You must be signed in to change notification settings - Fork 326
Description
github and npm introduced a new feature that allows you to publish from a specific workflow using oidc.
https://github.blog/changelog/2025-07-31-npm-trusted-publishing-with-oidc-is-generally-available/
To enable it, you enter your repo and the name of a workflow file in your npmjs.com package settings, add id-token: write
permission in that workflow and use npm publish
with npm version >=11.5
You can also specify a deployment environment in npm and in the workflow to ensure that the publish workflow is only run after approval (via github environment constraints).
All of this is tied to the workflow and you only want to run it when actually publishing to npm. But today the action does both. Which would require all runs to be approved manually, including creating or updating a "version packages" PR.
Suggested solution:
Allow users to specify 2 different workflows:
- changesets.yml
creates and updates release PRs - publish.yml
publish to registry, update release info etc.
The tricky part is how merging of a release PR would trigger the second workflow. I think it could be achieved with workflow_dispatch.