Skip to content

Commit

Permalink
ci: use builtin pnpm cache support
Browse files Browse the repository at this point in the history
  • Loading branch information
StarHeartHunt committed Oct 24, 2023
1 parent 561e586 commit 8facf94
Showing 1 changed file with 6 additions and 22 deletions.
28 changes: 6 additions & 22 deletions .github/actions/setup-node/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8facf94

Please sign in to comment.