Moved to https://github.com/wyvox/action-setup-pnpm so that more folks have access.
Correctly sets up node, pnpm, and cache for pnpm dependencies so that installation can be as fast as it can be.
steps:
- uses: actions/checkout@v3
- uses: NullVoxPopuli/action-setup-pnpm@v2
- dependency cache
- pnpm only
- choose
pnpm
version viapackage.json#packageManager
orpackage.json#volta.pnpm
- pass any args
- choose
While this action is meant to reduce boilerplate, you end up having one extra line than optimal if you need to customize anything, unless doing inline yaml-object syntax -- example:
- uses: NullVoxPopuli/action-setup-pnpm@v2
with: { node-version: 18 }
Allows changing the node-version
passed to actions/setup-node
.
- uses: NullVoxPopuli/action-setup-pnpm@v2
with:
node-version: 18
Allows changing the registry-url
passed to actions/setup-node
.
- uses: NullVoxPopuli/action-setup-pnpm@v2
with:
node-registry-url: "https://registry.npmjs.org"
Allows changing the pnpm-version
passed to pnpm/action-setup
.
- uses: NullVoxPopuli/action-setup-pnpm@v1
with:
pnpm-version: 7.29.0
Passes through any args directly to pnpm install
.
- uses: NullVoxPopuli/action-setup-pnpm@v2
with:
args: '--ignore-scripts --fix-lockfile'
Boolean flag useful for tossing out the lockfile for testing if in-range floating dependency changes have accidentally broken things.
- uses: NullVoxPopuli/action-setup-pnpm@v2
with:
no-lockfile: true
pnpm/action-setup
can install dependencies on its own, but then no cache is used from actions/setup-node
.
actions/setup-node
configures node, (and correctly respects volta
configurations), cache, etc
To set this up on your own, you would required three manual steps in your workflow config file:
steps:
# ...
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
cache: 'pnpm'
- run: pnpm install