From e3a317344860a63ac25e2d74cee7fea8e7243d8f Mon Sep 17 00:00:00 2001 From: TonyRL Date: Fri, 5 May 2023 16:19:26 +0000 Subject: [PATCH] chore: use pnpm to publish --- .github/workflows/npm-publish.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 809ffecc9..5746efe3d 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -20,18 +20,24 @@ jobs: timeout-minutes: 5 steps: - uses: actions/checkout@v3 + - uses: pnpm/action-setup@v2 + with: + version: 8 - uses: actions/setup-node@v3 with: node-version: 18 - cache: 'npm' + cache: 'pnpm' registry-url: 'https://registry.npmjs.org' - - run: npm install -g npm + - name: Install dependencies (pnpm) + run: pnpm i + - name: Run postinstall script for dependencies + run: pnpm rb - name: Release run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" npx version-from-git --allow-same-version --template 'master.short' - name: Publish to npmjs - run: npm publish --provenance --access public + run: pnpm publish --provenance --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}