From 248511760ede0779411b45d6df6baf7c6a14c7b8 Mon Sep 17 00:00:00 2001 From: Robbert Date: Mon, 28 Oct 2024 09:52:29 +0100 Subject: [PATCH] chore: configure pnpm version for corepack (#1659) Co-authored-by: Aram <37216945+alimpens@users.noreply.github.com> --- .github/workflows/feature-branch-cleanup.yml | 8 +++---- .github/workflows/feature-branch-deploy.yml | 17 +++++++------- .github/workflows/lint-test.yml | 24 +++++++++----------- .github/workflows/publish.yml | 17 +++++++------- package.json | 3 ++- 5 files changed, 33 insertions(+), 36 deletions(-) diff --git a/.github/workflows/feature-branch-cleanup.yml b/.github/workflows/feature-branch-cleanup.yml index 443268703e..a7963ae81f 100644 --- a/.github/workflows/feature-branch-cleanup.yml +++ b/.github/workflows/feature-branch-cleanup.yml @@ -20,13 +20,13 @@ jobs: echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV - name: Check out - uses: actions/checkout@v4 + uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 with: ref: gh-pages - - uses: actions/setup-node@v4 + - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 with: - node-version: 20 + node-version-file: .nvmrc - name: Delete folder run: | @@ -38,7 +38,7 @@ jobs: git push - name: Deactivate deployment - uses: bobheadxi/deployments@v1 + uses: bobheadxi/deployments@648679e8e4915b27893bd7dbc35cb504dc915bc8 # v1.5.0 if: always() with: step: deactivate-env diff --git a/.github/workflows/feature-branch-deploy.yml b/.github/workflows/feature-branch-deploy.yml index e31ac8addd..c8dce14917 100644 --- a/.github/workflows/feature-branch-deploy.yml +++ b/.github/workflows/feature-branch-deploy.yml @@ -21,25 +21,24 @@ jobs: echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV - name: Check out - uses: actions/checkout@v4 + uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Create deployment - uses: bobheadxi/deployments@v1 + uses: bobheadxi/deployments@648679e8e4915b27893bd7dbc35cb504dc915bc8 # v1.5.0 id: deployment with: step: start token: ${{ secrets.GITHUB_TOKEN }} env: demo-${{ env.BRANCH_NAME }} - - uses: actions/setup-node@v4 + - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 with: - node-version: 20 + node-version-file: .nvmrc - - uses: pnpm/action-setup@v4 + - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 name: Install pnpm id: pnpm-install with: - version: 9 run_install: false - name: Install dependencies @@ -56,14 +55,14 @@ jobs: touch ./storybook/dist/${{ github.sha }}.txt - name: Pushing to pages branch - uses: JamesIves/github-pages-deploy-action@v4 + uses: JamesIves/github-pages-deploy-action@94f3c658273cf92fb48ef99e5fbc02bd2dc642b2 # v4.6.3 with: branch: gh-pages folder: storybook/dist target-folder: demo-${{ env.BRANCH_NAME }} - name: Wait for GitHub Pages to be deployed - uses: mydea/action-wait-for-api@v2 + uses: mydea/action-wait-for-api@45d9c58e690337a05eb5ae14a1478f29eacbf9db # v2.0.0 with: url: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/demo-${{ env.BRANCH_NAME }}/${{ github.sha }}.txt expected-status: 200 @@ -71,7 +70,7 @@ jobs: interval: 15 - name: Update deployment status - uses: bobheadxi/deployments@v1 + uses: bobheadxi/deployments@648679e8e4915b27893bd7dbc35cb504dc915bc8 # v1.5.0 if: always() with: step: finish diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml index 5ac9259d35..8651c8fe33 100644 --- a/.github/workflows/lint-test.yml +++ b/.github/workflows/lint-test.yml @@ -11,18 +11,17 @@ jobs: steps: - name: Check out branch - uses: actions/checkout@v4 + uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Set up Node.js version - uses: actions/setup-node@v4 + uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 with: - node-version: "20" + node-version-file: .nvmrc - name: Install pnpm - uses: pnpm/action-setup@v4 + uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 id: pnpm-install with: - version: 9 run_install: false - name: Get pnpm store directory @@ -31,7 +30,7 @@ jobs: echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT - name: Set up pnpm cache - uses: actions/cache@v4 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 with: path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} @@ -49,18 +48,17 @@ jobs: steps: - name: Check out branch - uses: actions/checkout@v4 + uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Set up Node.js version - uses: actions/setup-node@v4 + uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 with: - node-version: "20" + node-version-file: .nvmrc - name: Install pnpm - uses: pnpm/action-setup@v4 + uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 id: pnpm-install with: - version: 9 run_install: false - name: Get pnpm store directory @@ -69,7 +67,7 @@ jobs: echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT - name: Set up pnpm cache - uses: actions/cache@v4 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 with: path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} @@ -93,7 +91,7 @@ jobs: pnpm run --if-present test - name: "Retain build artifact: Storybook" - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 with: name: storybook path: storybook/dist/ diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 073a092f17..0392719ca2 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,7 +13,7 @@ jobs: steps: - name: Create release - uses: googleapis/release-please-action@v4 + uses: googleapis/release-please-action@d1a8f221d7723166f48a584aebba00ef3f6febec # v4.1.4 id: release with: token: ${{ secrets.GITHUB_TOKEN }} @@ -21,7 +21,7 @@ jobs: # The logic below handles the npm publication: - name: Check out branch - uses: actions/checkout@v4 + uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 with: # This is necessary because on.workflow_run always runs on the # default branch, which is 'develop' in our case @@ -31,17 +31,16 @@ jobs: if: ${{ steps.release.outputs.releases_created == 'true' }} - name: Set up Node.js version - uses: actions/setup-node@v4 + uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 with: - node-version: 20 + node-version-file: .nvmrc registry-url: "https://registry.npmjs.org" if: ${{ steps.release.outputs.releases_created == 'true' }} - name: Install pnpm - uses: pnpm/action-setup@v4 + uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 id: pnpm-install with: - version: 9 run_install: false if: ${{ steps.release.outputs.releases_created == 'true' }} @@ -52,7 +51,7 @@ jobs: if: ${{ steps.release.outputs.releases_created == 'true' }} - name: Set up pnpm cache - uses: actions/cache@v4 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 with: path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} @@ -76,7 +75,7 @@ jobs: # The logic below handles the Storybook deploy: - name: "Restore build artifact: Storybook" - uses: dawidd6/action-download-artifact@v6 + uses: dawidd6/action-download-artifact#bf251b5aa9c2f7eeb574a96ee720e24f801b7c11 # v6 with: workflow: "lint-test.yml" name: storybook @@ -84,7 +83,7 @@ jobs: if: ${{ steps.release.outputs.releases_created == 'true' }} - name: Deploy to GitHub Pages - uses: JamesIves/github-pages-deploy-action@v4 + uses: JamesIves/github-pages-deploy-action@94f3c658273cf92fb48ef99e5fbc02bd2dc642b2 # v4.6.3 with: branch: gh-pages folder: dist/storybook diff --git a/package.json b/package.json index f7337d0f58..d75ebf328d 100644 --- a/package.json +++ b/package.json @@ -100,5 +100,6 @@ "path-to-regexp@<0.1.10": ">=0.1.10", "cookie@<0.7.0": ">=0.7.0" } - } + }, + "packageManager": "pnpm@9.12.2+sha512.22721b3a11f81661ae1ec68ce1a7b879425a1ca5b991c975b074ac220b187ce56c708fe5db69f4c962c989452eee76c82877f4ee80f474cebd61ee13461b6228" }