Add npm token validation to release workflow#3
Merged
Conversation
- Fail fast when `NPM_TOKEN` is missing - Configure npm auth and registry before Changesets publish - Pass `NODE_AUTH_TOKEN` for release publishing
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
NPM_TOKENis present before the release publish step runs.@create-markdownregistry toregistry.npmjs.org.NODE_AUTH_TOKENthrough to the Changesets action to support publishing.Testing
NPM_TOKENis missing or empty.NPM_TOKENandNODE_AUTH_TOKENin the job environment.Note
Low Risk
Low risk workflow-only change that affects publishing/auth configuration; failures are limited to the release pipeline if secrets or auth settings are incorrect.
Overview
The release workflow now fails fast if
NPM_TOKENis missing/empty before attempting to publish.npm authentication is switched to
npm config setand explicitly sets the@create-markdownscope registry tohttps://registry.npmjs.org/. The Changesets publish step also receivesNODE_AUTH_TOKEN(mapped to the same secret) to improve compatibility with npm publishing.Reviewed by Cursor Bugbot for commit fdeddea. Bugbot is set up for automated code reviews on this repo. Configure here.