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@v6Inputs
| Name | Required | Default | Description |
|---|---|---|---|
version | No | none | Version of pnpm to install |
dest | No | ~/setup-pnpm | Where to store pnpm files |
run_install | No | null | If specified, run `pnpm install` |
cache | No | false | Whether to cache the pnpm store directory |
cache_dependency_path | No | pnpm-lock.yaml | File path to the pnpm lockfile, whose contents hash will be used as a cache key. Accepts multiple paths delimited by newlines. |
package_json_file | No | package.json | File path to the package.json to read "packageManager" configuration. This path must be relative to the repository root (GITHUB_WORKSPACE). |
standalone | No | false | When 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
| Name | Description |
|---|---|
dest | Expanded path of inputs#dest |
bin_dest | Location 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-lockfileEach 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.