@@ -25,33 +25,40 @@ outputs:
2525runs :
2626 using : ' composite'
2727 steps :
28+ - name : Install pnpm
29+ uses : pnpm/action-setup@v4
30+ with :
31+ version : ' 10'
32+ run_install : false
33+
2834 - name : Install Node
2935 uses : actions/setup-node@v4
3036 with :
3137 node-version : ${{ inputs.node-version }}
38+ cache : ' pnpm'
3239
33- - name : Get NPM cache directory
40+ - name : Get PNPM store directory
3441 id : npm-cache-dir
3542 shell : bash
36- run : echo "dir=$(npm config get cache )" >> ${GITHUB_OUTPUT}
43+ run : echo "dir=$(pnpm store path )" >> ${GITHUB_OUTPUT}
3744
38- - name : Restore NPM cache
45+ - name : Restore PNPM store
3946 id : restore-cache
4047 uses : actions/cache/restore@v4
4148 with :
4249 path : ${{ steps.npm-cache-dir.outputs.dir }}
43- key : npm -main-${{ inputs.platform }}-${{ hashFiles('./package -lock.json ') }}
50+ key : pnpm -main-${{ inputs.platform }}-${{ hashFiles('./pnpm -lock.yaml ') }}
4451 restore-keys : |
45- npm -main-${{ inputs.platform }}-
52+ pnpm -main-${{ inputs.platform }}-
4653
4754 - name : Download dependencies
4855 shell : bash
4956 run : |
50- npm ci --ignore-scripts --verbose || npm ci --ignore-scripts --verbose || npm ci --ignore-scripts --verbose
57+ pnpm install --frozen-lockfile
5158
52- - name : Save NPM cache
59+ - name : Save PNPM store
5360 if : inputs.save-cache == 'true'
5461 uses : actions/cache/save@v4
5562 with :
5663 path : ${{ steps.npm-cache-dir.outputs.dir }}
57- key : npm -main-${{ inputs.platform }}-${{ hashFiles('./package -lock.json ') }}
64+ key : pnpm -main-${{ inputs.platform }}-${{ hashFiles('./pnpm -lock.yaml ') }}
0 commit comments