Skip to content

Allow publishing initial version with OIDC #8544

Open

Description

@johnbillion

Support for trusted publishing using OIDC was added in #8336 and is now generally available.

One limitation is that it's not possible to publish the initial version of a package using OIDC, it needs to be published manually or using a token. It would be great to support OIDC publishing for the initial version.

The main problem is that the UI on npmjs.com requires a package to exist before you can edit its settings and enable OIDC publishing. PyPI solved this by allowing a package to be configured with OIDC publishing before it exists. This was mentioned by @Shegox on https://github.com/orgs/community/discussions/127011#discussioncomment-9933132.

Activity

  1. Shegox commented on Sep 1, 2025

    @Shegox

    Hello @johnbillion,

    thank you for creating a dedicated issue for this. I would like to give as well a few ideas on potential implementations. Instead of allowing the publishing with OIDC for not yet created packages another option would be to allow "empty" packages to be created on npmjs.com.
    I could imagine if that is not feasible, there could be a specific version string dedicated which is treated as "empty". E.g. 0.0.0-dummy-npm. We do it with such a dummy version currently and then delete the dummy version again after the team published their first real version. Or if they are not quick enough only deprecate it, which is not really great. So having an official dummy version which can always be deleted would give us already a nice workaround to grab a package name, setup the OIDC publishing and deleting the dummy version again after the first real version is published.

    Anyway, thank you again for looking into this. Really loving the OIDC publishing features so far 🚀

  2. owlstronaut commented on Sep 5, 2025

    @owlstronaut

    @johnbillion Thank you for bringing this to discussion! We determined to not have "first publish" available to limit scope in our MVP, but are evaluating options for the next step. This is on our minds 😄

  3. 34j commented on Oct 26, 2025

    @34j

    setup-npm-trusted-publish, a dedicated tool for this, can be used to publish a "dummy" package to npm:

    npx --yes setup-npm-trusted-publish <package-name>
  4. RobertCraigie commented on Dec 19, 2025

    @RobertCraigie

    Any updated plans for this? It makes shipping a new package much more involved than it ideally would be.

  5. lcovar commented on Mar 3, 2026

    @lcovar

    what's the latest on this?

  6. AMDphreak commented on Mar 11, 2026

    @AMDphreak

    @owlstronaut Hi, would this feature remove the need to use npm's CLI tool to init the registry publishing configuration? Sorry, I know the initial setup process is still not that easy, but I'm not sure if this feature would remove the required step of using the CLI to init, or using a temporary API token to work around this problem. Overall, I would say the publishing process is still very inconvenient and not well explained between the instructions and alerts in the npmjs UI and the npmjs docs.

  7. 191 remaining items

  8. added a commit that references this issue on Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Enhancementarea:registry

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions