fix(workflows): add pnpm installing and caching (#12374)

This commit is contained in:
Phantom 2026-01-08 17:42:59 +08:00 committed by GitHub
parent 7ff6955870
commit 2a1722bb52
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -58,6 +58,22 @@ jobs:
with:
node-version: 22
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
- name: Cache pnpm dependencies
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Install dependencies
if: steps.check_time.outputs.should_delay == 'false'
run: pnpm install