From bea6c9471616bc1d53c319fc88c3525589b23b2f Mon Sep 17 00:00:00 2001 From: sor4chi Date: Wed, 27 Sep 2023 02:20:37 +0900 Subject: [PATCH] ci: add a setup of pnpm setup and cache --- .github/workflows/release.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bf57cf8..bda947a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,8 +20,27 @@ jobs: with: node-version: 18.x + - uses: pnpm/action-setup@v2 + name: Install pnpm + with: + version: 7 + 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 + run: pnpm install --frozen-lockfile - name: Create Release Pull Request or Publish to npm id: changesets @@ -31,4 +50,3 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} -