Skip to content

Commit

Permalink
ci: fix pnpm version, use pnpm cache
Browse files Browse the repository at this point in the history
  • Loading branch information
chuangcaleb committed Oct 7, 2023
1 parent 39bbaef commit c28c066
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,39 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: git-checkout
- name: Checkout
uses: actions/checkout@v3

- name: Use Node.js
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: "20.x"

- name: pnpm-setup
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- name: Build
id: build
run: |
pnpm
pnpm build
mkdir ${{ env.PLUGIN_NAME }}
cp main.js manifest.json styles.css ${{ env.PLUGIN_NAME }}
Expand Down

0 comments on commit c28c066

Please sign in to comment.