Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.

Commit c1ec9e0

Browse files
committed
Use pnpm setup action
1 parent ab720fe commit c1ec9e0

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

.github/workflows/build.yml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,35 @@ jobs:
1919

2020
# Steps represent a sequence of tasks that will be executed as part of the job
2121
steps:
22-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
23-
- uses: actions/checkout@v3
22+
- name: Checkout
23+
uses: actions/checkout@v3
24+
25+
- name: Install Node.js
26+
uses: actions/setup-node@v3
27+
with:
28+
node-version: '18'
29+
30+
- name: Install pnpm
31+
uses: pnpm/action-setup@v2
32+
id: pnpm-install
33+
with:
34+
version: '8'
35+
run_install: false
36+
37+
- name: Get pnpm store directory
38+
id: pnpm-cache
39+
shell: bash
40+
run: |
41+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
2442
2543
- name: Cache
2644
uses: actions/cache@v3
2745
env:
2846
cache-name: cache-node-modules-v3
2947
with:
30-
path: ~/.local/share/pnpm/store
48+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
3149
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package.json') }}
3250

33-
- name: Use Node.js
34-
uses: actions/setup-node@v3
35-
with:
36-
node-version: '18'
37-
- name: Install pnpm
38-
run: npm i -g pnpm
3951
- name: Install dependencies
4052
run: pnpm install
4153

0 commit comments

Comments
 (0)