Skip to content

BUILD-10954 Use npm Trusted Publisher for release workflow#666

Merged
jayadeep-km-sonarsource merged 1 commit into
mainfrom
BUILD-10954-npm-trusted-publisher
Apr 9, 2026
Merged

BUILD-10954 Use npm Trusted Publisher for release workflow#666
jayadeep-km-sonarsource merged 1 commit into
mainfrom
BUILD-10954-npm-trusted-publisher

Conversation

@jayadeep-km-sonarsource
Copy link
Copy Markdown
Contributor

@jayadeep-km-sonarsource jayadeep-km-sonarsource commented Apr 9, 2026

What

Set useNpmTrustedPublisher: true and githubEnvironment: release in the release workflow to enable OIDC-based npm publishing via npm Trusted Publishers.

Why

Part of BUILD-10825 — migrating npm deployments from persistent Vault tokens to short-lived OIDC tokens via GitHub Actions Trusted Publishers.

Pre-requisites already completed:

  • npm Trusted Publisher configured on npmjs.org for echoes-react
  • GitHub Environment release created, restricted to tags

Further read: https://docs.npmjs.com/trusted-publishers/#supported-cicd-providers

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 9, 2026

Deploy Preview for echoes-react ready!

Name Link
🔨 Latest commit 18bdf98
🔍 Latest deploy log https://app.netlify.com/projects/echoes-react/deploys/69d7707598e0d40008ad9333
😎 Deploy Preview https://deploy-preview-666--echoes-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@hashicorp-vault-sonar-prod
Copy link
Copy Markdown

hashicorp-vault-sonar-prod Bot commented Apr 9, 2026

BUILD-10954

@sonar-review-alpha
Copy link
Copy Markdown

sonar-review-alpha Bot commented Apr 9, 2026

Summary

This PR enables OIDC-based npm publishing in the release workflow by adding two configuration parameters to the shared workflow call:

  • useNpmTrustedPublisher: true — activates npm Trusted Publisher authentication (short-lived OIDC tokens instead of persistent credentials)
  • githubEnvironment: release — specifies the GitHub Environment that enforces deployment restrictions

This is a pure configuration change with no workflow logic or permission modifications. The id-token: write permission required for OIDC is already present.

What reviewers should know

What to verify:

  • The two new parameters are passed to the correct shared workflow call
  • The id-token: write permission (visible in the diff context) is already available — this is required for OIDC token generation

Prerequisites (per author):

  • npm Trusted Publisher is already configured on npmjs.org
  • GitHub Environment release already exists and is restricted to tags matching the release pattern

No logic changes here — this is purely enabling an already-configured authentication mechanism. If you're unfamiliar with npm Trusted Publishers, they're GitHub's replacement for permanent npm tokens: GitHub issues short-lived OIDC tokens at release time, eliminating the need to store long-term credentials.


  • Generate Walkthrough
  • Generate Diagram

🗣️ Give feedback

@sonarqube-next
Copy link
Copy Markdown

sonarqube-next Bot commented Apr 9, 2026

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
0 Dependency risks
No data about Coverage
No data about Duplication

See analysis details on SonarQube

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown

@sonar-review-alpha sonar-review-alpha Bot left a comment

Choose a reason for hiding this comment

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

LGTM! ✅

Clean, minimal change. The two new parameters are correct for enabling npm Trusted Publisher support, and the required id-token: write permission is already present in the workflow. Nothing blocking merge.

🗣️ Give feedback

@jayadeep-km-sonarsource jayadeep-km-sonarsource merged commit a3e7d72 into main Apr 9, 2026
12 checks passed
@jayadeep-km-sonarsource jayadeep-km-sonarsource deleted the BUILD-10954-npm-trusted-publisher branch April 9, 2026 12:57
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.

2 participants