diff --git a/.github/actions/nodejs/action.yaml b/.github/actions/nodejs/action.yaml index ef62f30be32..eaa77ceae50 100644 --- a/.github/actions/nodejs/action.yaml +++ b/.github/actions/nodejs/action.yaml @@ -31,8 +31,14 @@ runs: - name: Cache NPM build artifacts uses: actions/cache@v4 with: + # Cache the unplugged packages (unpacked native builds), yarn's + # build-state (so postinstalls don't re-run) and install-state + # (cold-start avoidance). Missing paths are tolerated by the + # action, so first-run behavior is unaffected. path: | .yarn/unplugged + .yarn/build-state.yml + .yarn/install-state.gz key: ${{ runner.os }}/yarn/unplugged/${{ runner.arch }}/${{ hashFiles('yarn.lock') }} restore-keys: | ${{ runner.os }}/yarn/unplugged/${{ runner.arch }}/