Skip to content

[Feat] separate workflow for publish to improve support for publishing w oidc #515

@dominikg

Description

@dominikg

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:

  1. changesets.yml
    creates and updates release PRs
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions