Skip to content

Conversation

@buckett
Copy link
Member

@buckett buckett commented Oct 15, 2025

For publishing we would have to use very short lived tokens, so we switch to OIDC which means we don't need tokens.

We bump the node version to get the version of npm that supports this.

For publishing we would have to use very short lived tokens, so we switch to OIDC which means we don't need tokens.

We bump the node version to get the version of npm that supports this.
@sonarqubecloud
Copy link

@buckett buckett requested a review from Copilot October 15, 2025 08:09
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR switches from NPM token-based authentication to OpenID Connect (OIDC) for publishing packages to npmjs.com, eliminating the need for storing long-lived tokens. It also updates the Node.js version to support the required npm features.

  • Removes NPM token authentication in favor of OIDC authentication
  • Updates Node.js version from 22 to 24.10.0 to get npm version with OIDC support
  • Adds required OIDC permissions to the GitHub workflow

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
.nvmrc Updates Node.js version to 24.10.0 for npm OIDC support
.github/workflows/release-tags.yml Configures OIDC permissions and removes NPM token authentication

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

always-auth: true
- run: npm ci
- run: npm run build
- run: npm publish --access public
Copy link

Copilot AI Oct 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The npm publish command needs to be configured to use OIDC authentication. You should add the --provenance flag to enable npm's built-in OIDC support, which will automatically use the GitHub OIDC token for authentication.

Suggested change
- run: npm publish --access public
- run: npm publish --access public --provenance

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's strange that https://docs.npmjs.com/trusted-publishers doesn't mention this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs say:

   provenance

       •   Default: false

       •   Type: Boolean

       When publishing from a supported cloud CI/CD system, the package will be publicly linked to where it was built and
       published from.

@buckett buckett merged commit 240fe5c into master Oct 22, 2025
6 checks passed
@buckett buckett deleted the oidc-publish branch October 22, 2025 08:34
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.

3 participants