Skip to content

Commit 2b76445

Browse files
committed
Add cache to workflow
1 parent 208fadb commit 2b76445

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

.github/actions/release.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import path from 'path'
22
import { fileURLToPath } from 'url'
33
import fs from 'node:fs/promises'
4-
import { promisify } from 'util'
54
import * as github from '@actions/github'
65
import { execaCommand } from 'execa'
76

.github/workflows/release.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,24 @@ jobs:
2626
name: Install pnpm
2727
with:
2828
version: latest
29-
run_install: true
29+
run_install: false
30+
31+
- name: Get pnpm store directory
32+
id: pnpm-cache
33+
shell: bash
34+
run: |
35+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
36+
37+
- uses: actions/cache@v3
38+
name: Setup pnpm cache
39+
with:
40+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
41+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
42+
restore-keys: |
43+
${{ runner.os }}-pnpm-store-
44+
45+
- name: Install dependencies
46+
run: pnpm install
3047

3148
- name: install Rust stable
3249
uses: dtolnay/rust-toolchain@stable

0 commit comments

Comments
 (0)