From 4ec74bc85e9797a73f5228788227aef87c936a51 Mon Sep 17 00:00:00 2001 From: Tommaso Casaburi Date: Fri, 20 Mar 2026 18:32:43 +0800 Subject: [PATCH] fix(ci): cache yarn after corepack in windows packaging --- .github/workflows/ci.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1ba5de53..caad3864 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -386,10 +386,20 @@ jobs: uses: actions/setup-node@v4 with: node-version: 22 - cache: 'yarn' - cache-dependency-path: yarn.lock - run: corepack enable + - name: Resolve Yarn cache path + id: yarn-cache + shell: bash + run: echo "dir=$(corepack yarn config get cacheFolder)" >> "$GITHUB_OUTPUT" + + - name: Cache Yarn package tarballs + uses: actions/cache@v4 + with: + path: ${{ steps.yarn-cache.outputs.dir }} + key: ${{ runner.os }}-yarn-v1-${{ hashFiles('yarn.lock', 'package.json', '.yarnrc.yml') }} + restore-keys: ${{ runner.os }}-yarn-v1- + - name: Cache electron binaries uses: actions/cache@v4 with: