ci: configure npm auth and pass GITHUB_TOKEN for unstable publish#14772
Merged
ci: configure npm auth and pass GITHUB_TOKEN for unstable publish#14772
Conversation
|
osama-rizk
approved these changes
Apr 9, 2026
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.
Description of changes
changeset publishcallsnpm publishunder the hood, and npm requires auth credentials in~/.npmrc. Previously,changesets/actionhandled writing the npm token to~/.npmrcautomatically. When the switch to a directrun:step was made, that setup was lost —NPM_TOKENwas passed as an env var, but npm doesn't read auth from environment variables.This PR adds a dedicated step to write the npm auth token to
~/.npmrcbefore publishing, matching the pattern used by the existingnpm-publishcomposite action in this repo (.github/actions/npm-publish/action.yml).Issue #, if available
Fixes the
Release UnstableworkflowENEEDAUTHfailure: https://github.com/aws-amplify/amplify-js/actions/runs/24179532870/job/70568727701Description of how you validated changes
Checklist
yarn testpassesChecklist for repo maintainers
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.