From 531307ebe1fdebbc7ce23756e709b71043fa6687 Mon Sep 17 00:00:00 2001 From: Tunglies <77394545+Tunglies@users.noreply.github.com> Date: Tue, 18 Nov 2025 20:05:49 +0800 Subject: [PATCH] fix(workflows): update pnpm cache key format and node version in autobuild and dev workflows --- .github/workflows/autobuild.yml | 18 +++++++++--------- .github/workflows/dev.yml | 11 ++++++++++- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index 894262216..ff074c0e8 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -190,13 +190,13 @@ jobs: node-version: "22" cache: "pnpm" - - name: Cache pnpm store + - name: Pnpm Cache uses: actions/cache@v4 with: path: ~/.pnpm-store - key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }} + key: "pnpm-shared-stable-${{ matrix.os }}-${{ matrix.target }}" restore-keys: | - ${{ runner.os }}-pnpm- + pnpm-shared-stable-${{ matrix.os }}-${{ matrix.target }} - name: Pnpm install and check run: | @@ -286,13 +286,13 @@ jobs: node-version: "22" cache: "pnpm" - - name: Cache pnpm store + - name: Pnpm Cache uses: actions/cache@v4 with: path: ~/.pnpm-store - key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }} + key: "pnpm-shared-stable-${{ matrix.os }}-${{ matrix.target }}" restore-keys: | - ${{ runner.os }}-pnpm- + pnpm-shared-stable-${{ matrix.os }}-${{ matrix.target }} - name: Pnpm install and check run: | @@ -436,13 +436,13 @@ jobs: node-version: "22" cache: "pnpm" - - name: Cache pnpm store + - name: Pnpm Cache uses: actions/cache@v4 with: path: ~/.pnpm-store - key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }} + key: "pnpm-shared-stable-${{ matrix.os }}-${{ matrix.target }}" restore-keys: | - ${{ runner.os }}-pnpm- + pnpm-shared-stable-${{ matrix.os }}-${{ matrix.target }} - name: Pnpm install and check run: | diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index ff9b2f5f6..647bbd7e2 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -103,9 +103,18 @@ jobs: if: github.event.inputs[matrix.input] == 'true' uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "22" cache: "pnpm" + - name: Pnpm Cache + uses: actions/cache@v4 + with: + path: ~/.pnpm-store + key: "pnpm-shared-stable-${{ matrix.os }}-${{ matrix.target }}" + restore-keys: | + pnpm-shared-stable-${{ matrix.os }}-${{ matrix.target }} + lookup-only: true + - name: Pnpm install and check if: github.event.inputs[matrix.input] == 'true' run: |