Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(npm-publish): setup node with registry url #8841

Merged
merged 3 commits into from
May 11, 2023

Conversation

caugner
Copy link
Contributor

@caugner caugner commented May 11, 2023

Summary

(MP-385)

Problem

The "npm publish" workflow is failing, and the real reason (after 3 unsuccessful tries) seems to be that npm doesn't actually use NPM_AUTH_TOKEN or NODE_AUTH_TOKEN, unless these are referenced in an .npmrc file.

Solution

Call the setup-node action with the registry-url input, which causes it to create an .npmrc file that references the NODE_AUTH_TOKEN environment file.

Also:

  • Reverts the env rename revert.
  • Reverts the --access revert (this is not necessary for scoped packages that are already published and public).

How did you test this change?

🤞

@caugner caugner requested a review from LeoMcA May 11, 2023 17:23
This creates an `.npmrc` file that references the token
from the `NODE_AUTH_TOKEN` environment variable.
@caugner caugner force-pushed the setup-node-with-registry-url branch from bfde0d2 to ff6208a Compare May 11, 2023 17:29
@caugner caugner force-pushed the setup-node-with-registry-url branch from ff6208a to f02bfdc Compare May 11, 2023 17:50
Copy link
Contributor Author

@caugner caugner left a comment

Choose a reason for hiding this comment

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

Self-approval.

@caugner caugner merged commit 660a28b into main May 11, 2023
@caugner caugner deleted the setup-node-with-registry-url branch May 11, 2023 17:57
Copy link
Member

@LeoMcA LeoMcA left a comment

Choose a reason for hiding this comment

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

Looks good, and looks like it worked! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants