@@ -3,47 +3,30 @@ description: Install's node, pnpm, restores cache, and then installs dependencie
33
44inputs :
55 node-version :
6- default : 20.x
7- registry-url :
8- default : " https://registry.npmjs.org"
6+ description : Node.js version to install
7+ default : ' 24'
98
109runs :
11- using : ' composite'
10+ using : composite
1211 steps :
13- # Install nodejs. https://github.com/actions/setup-node
14- - name : Setup Node.js
15- uses : actions/setup-node@v4
12+ - name : Install pnpm
13+ uses : pnpm/action-setup@v4
1614 with :
17- node-version : ${{ inputs.node-version }}
18- registry-url : ${{ inputs.registry-url }}
19-
20- # Ensure npm 11.5.1 or later is installed
21- # See https://docs.npmjs.com/trusted-publishers
22- # Note that pnpm publish runs npm publish
23- - name : Update npm
24- shell : bash
25- run : npm install -g npm@latest
15+ version : 10
2616
27- # Install pnpm. https://github.com/pnpm/action-setup
28- - uses : pnpm/action- setup@v4
17+ - name : Install Node.js ${{ inputs.node-version }}
18+ uses : actions/ setup-node@v6
2919 with :
30- version : 9
31- # run_install: false
20+ node-version : ${{ inputs.node-version }}
21+ registry-url : https://registry.npmjs.org
22+ cache : pnpm
3223
33- # Get pnpm store path so we can cache it
34- - name : Get pnpm store directory
24+ # Enable node compile cache (effective for Node 22+)
25+ # See https://nodejs.org/docs/v24.11.1/api/module.html#module-compile-cache
26+ - name : Enable Node Compile Cache
3527 shell : bash
36- run : |
37- echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
38-
39- - uses : actions/cache@v4
40- name : Setup pnpm cache
41- with :
42- path : ${{ env.STORE_PATH }}
43- key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
44- restore-keys : |
45- ${{ runner.os }}-pnpm-store-
28+ run : echo "NODE_COMPILE_CACHE=$HOME/.node_compile_cache" >> $GITHUB_ENV
4629
4730 - name : Install dependencies
48- run : pnpm install
49- shell : bash
31+ shell : bash
32+ run : pnpm install --frozen-lockfile
0 commit comments