From b9afaf0d7d9c085298517cc879cace74055c75d8 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Tue, 10 Sep 2024 01:06:48 -0700 Subject: [PATCH] ci: install pnpm before publishing --- .github/workflows/CI.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 52af5fe..508e2e2 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -90,8 +90,10 @@ jobs: with: name: minijson-${{ runner.os }}-${{ runner.arch }} path: ./dist + retention-days: 1 Release: + if: startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-latest needs: build steps: @@ -106,7 +108,7 @@ jobs: name: merged-artifacts path: dist/ - - name: Prepare + - name: Prepare Dist run: | chmod +x ./dist/*/minijson zip -9 -j ./dist/minijson-windows-x64.zip ./dist/win32-x64/minijson.exe @@ -116,7 +118,6 @@ jobs: ls -l ./dist - name: Draft the release - if: startsWith(github.ref, 'refs/tags/') uses: meeDamian/github-release@2.0 with: token: ${{ secrets.GITHUB_TOKEN }} @@ -128,8 +129,20 @@ jobs: dist/minijson-macos-arm64.tar.gz dist/minijson-linux-x64.tar.gz + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + + - name: Setup Pnpm + uses: pnpm/action-setup@v4 + with: + version: ${{ matrix.pnpm }} + + - name: Install dependencies + run: pnpm install + - name: Publish to npm - if: startsWith(github.ref, 'refs/tags/') run: pnpm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}