From 4cdf38035437a9bdbae28540cc4cdc71cb0f80a3 Mon Sep 17 00:00:00 2001 From: Quentin Roy Date: Wed, 31 Jan 2024 13:34:12 +0100 Subject: [PATCH] ci: remove pnpm/action-setup in favor of corepack (#222) * ci: remove pnpm/action-setup in favor of corepack fix node version deprecation warning in github * fix lint --- .github/workflows/node.js.yaml | 72 ++++------------------------------ .github/workflows/release.yaml | 23 +---------- 2 files changed, 10 insertions(+), 85 deletions(-) diff --git a/.github/workflows/node.js.yaml b/.github/workflows/node.js.yaml index 4cc4103a..e1833909 100644 --- a/.github/workflows/node.js.yaml +++ b/.github/workflows/node.js.yaml @@ -14,26 +14,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - run: corepack enable - name: Install Node.js 20.x.x uses: actions/setup-node@v4 with: + cache: 'pnpm' node-version: 20.x.x - - name: Install pnpm - uses: pnpm/action-setup@v2 - id: pnpm-install - with: - run_install: false - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - uses: actions/cache@v4 - name: Setup pnpm cache - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - run: pnpm install --frozen-lockfile - run: pnpm run build-all - uses: actions/upload-artifact@v4 @@ -46,26 +32,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - run: corepack enable - name: Install Node.js 20.x.x uses: actions/setup-node@v4 with: + cache: 'pnpm' node-version: 20.x.x - - name: Install pnpm - uses: pnpm/action-setup@v2 - id: pnpm-install - with: - run_install: false - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - uses: actions/cache@v4 - name: Setup pnpm cache - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - run: pnpm install --frozen-lockfile - uses: actions/download-artifact@v4 id: download @@ -78,26 +50,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - run: corepack enable - name: Install Node.js 20.x.x uses: actions/setup-node@v4 with: + cache: 'pnpm' node-version: 20.x.x - - name: Install pnpm - uses: pnpm/action-setup@v2 - id: pnpm-install - with: - run_install: false - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - uses: actions/cache@v4 - name: Setup pnpm cache - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - run: pnpm install --frozen-lockfile - run: pnpm run lint @@ -106,26 +64,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - run: corepack enable - name: Install Node.js 20.x.x uses: actions/setup-node@v4 with: + cache: 'pnpm' node-version: 20.x.x - - name: Install pnpm - uses: pnpm/action-setup@v2 - id: pnpm-install - with: - run_install: false - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - uses: actions/cache@v4 - name: Setup pnpm cache - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - run: pnpm install --frozen-lockfile - uses: actions/download-artifact@v4 id: download diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e69360c8..b9e7f954 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -13,33 +13,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - + - run: corepack enable - name: Install Node.js 20.x.x uses: actions/setup-node@v4 with: + cache: 'pnpm' node-version: 20.x.x - - - uses: pnpm/action-setup@v2 - name: Install pnpm - with: - run_install: false - - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - - uses: actions/cache@v4 - 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 - - name: Create Release Pull Request or Publish to npm id: changesets uses: changesets/action@v1