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

ci(node): authentication publish workflow fix #126

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

johnquinnvictaboada
Copy link

PR Summary: Adding registry-url to npm publish workflow

This PR adds the registry-url parameter to the actions/setup-node step in our npm publish workflow.

Key Change:

- name: Setup npm
      uses: actions/setup-node@v4
      with:
        node-version: 20.11.0
        cache: "npm"
        cache-dependency-path: "codegen/node/package.json"
        registry-url: 'https://registry.npmjs.org'

Why registry-url is needed:

  1. Authentication Setup: It configures npm to use the NODE_AUTH_TOKEN for the specified registry.
  2. Security: Ensures the auth token is only used for the intended registry.
  3. GitHub Actions Requirement: Unlike local environments, GitHub Actions needs this explicit configuration to properly authenticate npm operations.

Without registry-url, the workflow fails to authenticate, even with NODE_AUTH_TOKEN set, due to GitHub Actions' specific behavior.

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.

1 participant