pnpm/action-setup@v6

Install pnpm package manager

At a glance

Latest major
v6
Repository
pnpm/action-setup
Inputs
7 (0 required)
Outputs
2
Runs using
node24
License
MIT
Last checked

Inputs and outputs come straight from the action's official action.yml. See our editorial standards.

Usage

- uses: pnpm/action-setup@v6

Inputs

NameRequiredDefaultDescription
versionNononeVersion of pnpm to install
destNo~/setup-pnpmWhere to store pnpm files
run_installNonullIf specified, run `pnpm install`
cacheNofalseWhether to cache the pnpm store directory
cache_dependency_pathNopnpm-lock.yamlFile path to the pnpm lockfile, whose contents hash will be used as a cache key. Accepts multiple paths delimited by newlines.
package_json_fileNopackage.jsonFile path to the package.json to read "packageManager" configuration. This path must be relative to the repository root (GITHUB_WORKSPACE).
standaloneNofalseWhen set to true for pnpm v11 and earlier, install @pnpm/exe to use pnpm without Node.js. pnpm v12 uses the plain pnpm package's native executable.

Outputs

NameDescription
destExpanded path of inputs#dest
bin_destLocation of `pnpm` and `pnpx` command

Read an output with ${{ steps.<step-id>.outputs.<name> }}; the step needs an id.

Examples

Install pnpm

Install a pinned pnpm before `setup-node` so its cache can find the store.

name: Example
on:
  push:
    branches: [main]

permissions:
  contents: read

jobs:
  example:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - name: Setup pnpm
        uses: pnpm/action-setup@v6
        with:
          version: 9
      - run: pnpm install --frozen-lockfile

Each example passed actionlint (syntax, expressions and the inputs it knows for this action). They were not run in a live repository, so replace placeholder values such as names, ARNs and paths with your own.

Something out of date or wrong? Report it on our Contact page. This page is rebuilt from the action's repository roughly once a week.