From 8a147faad34b5816cf37e265f34db9a241ebc267 Mon Sep 17 00:00:00 2001 From: Quentin Roy Date: Wed, 31 Jan 2024 11:47:09 +0100 Subject: [PATCH 1/2] ci: remove pnpm/action-setup in favor of corepack fix node version deprecation warning in github --- .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..5d741a77 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..ea24b4a7 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 From 96459ea078836b07d1d52a9aa2ae3eb657fa0521 Mon Sep 17 00:00:00 2001 From: Quentin Roy Date: Wed, 31 Jan 2024 11:50:52 +0100 Subject: [PATCH 2/2] fix lint --- .github/workflows/node.js.yaml | 8 ++++---- .github/workflows/release.yaml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/node.js.yaml b/.github/workflows/node.js.yaml index 5d741a77..e1833909 100644 --- a/.github/workflows/node.js.yaml +++ b/.github/workflows/node.js.yaml @@ -18,7 +18,7 @@ jobs: - name: Install Node.js 20.x.x uses: actions/setup-node@v4 with: - cache: "pnpm" + cache: 'pnpm' node-version: 20.x.x - run: pnpm install --frozen-lockfile - run: pnpm run build-all @@ -36,7 +36,7 @@ jobs: - name: Install Node.js 20.x.x uses: actions/setup-node@v4 with: - cache: "pnpm" + cache: 'pnpm' node-version: 20.x.x - run: pnpm install --frozen-lockfile - uses: actions/download-artifact@v4 @@ -54,7 +54,7 @@ jobs: - name: Install Node.js 20.x.x uses: actions/setup-node@v4 with: - cache: "pnpm" + cache: 'pnpm' node-version: 20.x.x - run: pnpm install --frozen-lockfile - run: pnpm run lint @@ -68,7 +68,7 @@ jobs: - name: Install Node.js 20.x.x uses: actions/setup-node@v4 with: - cache: "pnpm" + cache: 'pnpm' node-version: 20.x.x - run: pnpm install --frozen-lockfile - uses: actions/download-artifact@v4 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ea24b4a7..b9e7f954 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -17,7 +17,7 @@ jobs: - name: Install Node.js 20.x.x uses: actions/setup-node@v4 with: - cache: "pnpm" + cache: 'pnpm' node-version: 20.x.x - name: Install dependencies run: pnpm install