From 8facf94c057d8489a3ac9be12c9d966ac056b340 Mon Sep 17 00:00:00 2001 From: StarHeart Date: Tue, 24 Oct 2023 08:38:52 +0800 Subject: [PATCH] ci: use builtin pnpm cache support --- .github/actions/setup-node/action.yml | 28 ++++++--------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml index 05db6cc1..86bc0f58 100644 --- a/.github/actions/setup-node/action.yml +++ b/.github/actions/setup-node/action.yml @@ -4,33 +4,17 @@ description: Setup Node runs: using: "composite" steps: - - name: Install Node.js - uses: actions/setup-node@v4 - with: - node-version: 18 - - - uses: pnpm/action-setup@v2 - name: Install pnpm - id: pnpm-install + - name: Install pnpm + uses: pnpm/action-setup@v2 with: version: 8 - run_install: false - - name: Get pnpm store directory - id: pnpm-cache - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT - - - uses: actions/cache@v3 - name: Setup pnpm cache + - name: Install Node.js + uses: actions/setup-node@v4 with: - path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- + node-version: 18 + cache: 'pnpm' - name: Install dependencies shell: bash run: pnpm install -