Skip to content

Support registry-url, scope and NODE_AUTH_TOKEN #13

Closed as not planned
Closed as not planned

Description

We have private company packages hosted on github packages. With setup-node we'd use the registry-url, scope and NODE_AUTH_TOKEN to set the auth when installing and publishing packages. Would be nice if pnpm/setup could support this.

Right now I have a workaround but it requires indirect setup and env vars (ci.npmrc for ci only and NPM_CONFIG_USERCONFIG pointing to it)

Activity

  1. guillaume-docquier-vention commented on Oct 13, 2026

    @guillaume-docquier-vention
    Author

    Closing since #50 was rejected in favor of using pnpm_config__auth env var

    See: #50 (comment)

    This is my setup now:

    name: Setup node and pnpm
    description: Sets up node and pnpm, authenticates @company packages and installs dependencies
    
    runs:
      using: composite
      steps:
        - name: Authenticate @company packages
          shell: bash
          env:
            TOKEN: ${{ github.token }}
          run: printf 'pnpm_config__auth={"https://npm.pkg.github.com":{"@company":{"authToken":"%s"}}}\n' "$TOKEN" >> "$GITHUB_ENV"
    
        - name: Setting up pnpm, node and installing packages
          uses: pnpm/setup@fbda4c85fc2e1e08721cd8763afea8f48d60f024 # v3.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions