File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : ' Install pnpm'
2- description : ' Installs the pnpm version from the root devDependencies.'
2+ description : ' Puts the pnpm version from the root devDependencies on PATH. Run it after the dependencies are installed .'
33
44runs :
55 using : ' composite'
66 steps :
77 # The dev dependency is the one pnpm version for CI and local runs. An app that needs another version sets
8- # `packageManager` in its package.json, and pnpm switches to that version. It is read from package.json rather
9- # than node_modules, so jobs that don't restore the monorepo's dependencies can use it.
10- - name : Resolve pnpm version
11- id : pnpm-version
8+ # `packageManager` in its package.json, and pnpm switches to that version.
9+ - name : Add pnpm to PATH
1210 shell : bash
13- run : echo "version=$(jq -er '.devDependencies.pnpm' "$GITHUB_WORKSPACE/package.json")" >> "$GITHUB_OUTPUT"
14- - uses : pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
15- with :
16- version : ${{ steps.pnpm-version.outputs.version }}
11+ run : echo "$GITHUB_WORKSPACE/node_modules/pnpm" >> "$GITHUB_PATH"
Original file line number Diff line number Diff line change @@ -1088,8 +1088,14 @@ jobs:
10881088 uses : denoland/setup-deno@v2.0.5
10891089 with :
10901090 deno-version : ${{ matrix.deno-version || 'v2.8.3' }}
1091+ # Not `install-pnpm`: it takes pnpm from the root node_modules, which this job doesn't restore.
1092+ - name : Resolve pnpm version
1093+ id : pnpm-version
1094+ run : echo "version=$(jq -er '.devDependencies.pnpm' package.json)" >> "$GITHUB_OUTPUT"
10911095 - name : Install pnpm
1092- uses : ./.github/actions/install-pnpm
1096+ uses : pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
1097+ with :
1098+ version : ${{ steps.pnpm-version.outputs.version }}
10931099
10941100 - name : Restore tarball artifacts
10951101 uses : actions/download-artifact@v8
@@ -1242,8 +1248,14 @@ jobs:
12421248 uses : denoland/setup-deno@v2.0.5
12431249 with :
12441250 deno-version : ${{ matrix.deno-version || 'v2.8.3' }}
1251+ # Not `install-pnpm`: it takes pnpm from the root node_modules, which this job doesn't restore.
1252+ - name : Resolve pnpm version
1253+ id : pnpm-version
1254+ run : echo "version=$(jq -er '.devDependencies.pnpm' package.json)" >> "$GITHUB_OUTPUT"
12451255 - name : Install pnpm
1246- uses : ./.github/actions/install-pnpm
1256+ uses : pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
1257+ with :
1258+ version : ${{ steps.pnpm-version.outputs.version }}
12471259
12481260 - name : Restore tarball artifacts
12491261 uses : actions/download-artifact@v8
You can’t perform that action at this time.
0 commit comments