From e4578ae2635c85a4bed00a3176745ade12976bf3 Mon Sep 17 00:00:00 2001 From: David Khourshid Date: Fri, 2 Aug 2024 10:25:08 -0400 Subject: [PATCH] Try pnpm again --- .github/actions/ci-setup/action.yml | 22 +++++++++++----------- .github/workflows/release.yml | 12 ++---------- 2 files changed, 13 insertions(+), 21 deletions(-) diff --git a/.github/actions/ci-setup/action.yml b/.github/actions/ci-setup/action.yml index febb9a5..ddc9555 100644 --- a/.github/actions/ci-setup/action.yml +++ b/.github/actions/ci-setup/action.yml @@ -7,18 +7,18 @@ runs: - uses: actions/setup-node@v4 with: node-version: 20.x + + - name: install pnpm + run: npm i pnpm@latest -g + shell: bash - - name: Get pnpm store directory + - name: Setup npmrc + run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc shell: bash - id: pnpm-cache - run: | - echo "pnpm_cache_dir=$(pnpm store path | tr -d '\n')" >> $GITHUB_OUTPUT - - uses: actions/cache@v4 - name: Setup pnpm cache - with: - path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- + + - name: setup pnpm config + run: pnpm config set store-dir $PNPM_CACHE_FOLDER + shell: bash + - run: pnpm install shell: bash diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a7fe0f0..0aa9588 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,19 +25,11 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/ci-setup - - name: Setup Node.js 20.x - uses: actions/setup-node@v4 - with: - node-version: 20.x - - - name: Install dependencies - run: npm install - - name: Create Release Pull Request or Publish to npm uses: changesets/action@v1 with: - publish: npm run release - version: npm run version + publish: pnpm run release + version: pnpm run version env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }}