fix: Apply OIDC auth to publish packages #46
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Summary
This commit transitions the package publishing workflow from token-based authentication to OpenID Connect (OIDC) authentication by removing the explicit
NPM_TOKENenvironment variable reference from the GitHub Actions workflow configuration.Technical Details
The modification involves removing the
NPM_TOKENsecret environment variable from the changesets publishing step in .github/workflows/publish.yml. This change reflects the adoption of OIDC-based authentication, which provides a more secure authentication mechanism by eliminating the need for long-lived, static authentication tokens.Security and Operational Benefits
Enhanced Security Posture:
Improved Operational Efficiency:
Implementation Context
The workflow maintains the
permissions: write-allconfiguration, which grants the necessary permissions for the GitHub Actions job to obtain OIDC tokens and authenticate with npm's registry. The changesets/action package publishing mechanism remains unchanged, with only the authentication method being modernized.This change aligns with current best practices for GitHub Actions security and npm registry authentication patterns.