From ca05317f13b46075b55fb5df9ca0fae592090f8f Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sun, 17 Sep 2023 01:52:47 +0000 Subject: [PATCH] Use pnpm on GitHub Actions --- .github/workflows/build.yml | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d467051..e4bd7ff 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,20 +11,15 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - - uses: actions/cache@v3 + - uses: pnpm/action-setup@v2 + - uses: setup-node@v2 with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - - run: yarn install --frozen-lockfile - - run: yarn lint - - run: yarn build - - run: yarn package + node-version-file: 'package.json' + cache: 'pnpm' + - run: pnpm install --frozen-lockfile + - run: pnpm lint + - run: pnpm build + - run: pnpm package - uses: actions/upload-artifact@v3 with: name: dist