Skip to content

Conversation

@WillsB3
Copy link

@WillsB3 WillsB3 commented Nov 20, 2025

Fixes #771

Adds support for publishing to NPM using OIDC authentication at publish time.

I've tested this with a private package and with these changes am able to publish via a GitHub actions workflow using OIDC authentication by following the NPM documentation.

This change updates the NPM prerequisite checks to skip the `npm whoami`
authentication check in environments where OIDC has been configured.

In environments using OIDC, authentication occurs automatically at
publish time, and so running `npm whoami` fails.

NPM currently only supports OIDC via GitHub & GitLab, so the
implementation in this commit adds the relevant checks to detect those
environments, but we’ll need to extend this in the future as NPM
supports more providers should we want to retain parity.
@WillsB3 WillsB3 changed the title Auto-detect environments with OIDC authentication Support publishing via OIDC authentication Nov 20, 2025
@WillsB3
Copy link
Author

WillsB3 commented Nov 20, 2025

Am I doing something wrong?… The tests that are failing in this PR also seem to fail when I run npm run test on main

Screenshot 2025-11-20 at 11 21 25

@WillsB3 WillsB3 marked this pull request as ready for review November 20, 2025 11:23
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.

Support OIDC publishing

1 participant