diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0ab6fc1c1..bcbf71c29 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,8 +56,11 @@ jobs: with: node-version: '20' - - name: Install pnpm - uses: pnpm/action-setup@v6 + - name: Enable Corepack + run: corepack enable + + - name: Verify pnpm version + run: pnpm --version - name: Get pnpm store directory shell: bash @@ -68,9 +71,9 @@ jobs: uses: actions/cache@v5 with: path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-v2-${{ hashFiles('**/pnpm-lock.yaml') }} + key: ${{ runner.os }}-pnpm-store-v3-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | - ${{ runner.os }}-pnpm-store-v2- + ${{ runner.os }}-pnpm-store-v3- - name: Install dependencies run: pnpm install --frozen-lockfile @@ -105,8 +108,11 @@ jobs: with: node-version: '20' - - name: Install pnpm - uses: pnpm/action-setup@v6 + - name: Enable Corepack + run: corepack enable + + - name: Verify pnpm version + run: pnpm --version - name: Get pnpm store directory shell: bash @@ -117,9 +123,9 @@ jobs: uses: actions/cache@v5 with: path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-v2-${{ hashFiles('**/pnpm-lock.yaml') }} + key: ${{ runner.os }}-pnpm-store-v3-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | - ${{ runner.os }}-pnpm-store-v2- + ${{ runner.os }}-pnpm-store-v3- - name: Install dependencies run: pnpm install --frozen-lockfile @@ -168,8 +174,11 @@ jobs: with: node-version: '20' - - name: Install pnpm - uses: pnpm/action-setup@v6 + - name: Enable Corepack + run: corepack enable + + - name: Verify pnpm version + run: pnpm --version - name: Get pnpm store directory shell: bash @@ -180,9 +189,9 @@ jobs: uses: actions/cache@v5 with: path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-v2-${{ hashFiles('**/pnpm-lock.yaml') }} + key: ${{ runner.os }}-pnpm-store-v3-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | - ${{ runner.os }}-pnpm-store-v2- + ${{ runner.os }}-pnpm-store-v3- - name: Setup Next.js cache uses: actions/cache@v5 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 839f925b0..5ec270dc4 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -24,8 +24,11 @@ jobs: with: node-version: '20' - - name: Install pnpm - uses: pnpm/action-setup@v6 + - name: Enable Corepack + run: corepack enable + + - name: Verify pnpm version + run: pnpm --version - name: Get pnpm store directory shell: bash @@ -36,9 +39,9 @@ jobs: uses: actions/cache@v5 with: path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-v2-${{ hashFiles('**/pnpm-lock.yaml') }} + key: ${{ runner.os }}-pnpm-store-v3-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | - ${{ runner.os }}-pnpm-store-v2- + ${{ runner.os }}-pnpm-store-v3- - name: Install dependencies run: pnpm install --frozen-lockfile diff --git a/.github/workflows/pr-automation.yml b/.github/workflows/pr-automation.yml index d755f525d..295b6c1f6 100644 --- a/.github/workflows/pr-automation.yml +++ b/.github/workflows/pr-automation.yml @@ -65,8 +65,8 @@ jobs: with: node-version: '20' - - name: Install pnpm - uses: pnpm/action-setup@v6 + - name: Enable Corepack + run: corepack enable - name: Install dependencies run: pnpm install --frozen-lockfile diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 89a894973..aa6cbbae6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,8 +23,11 @@ jobs: with: node-version: '20' - - name: Install pnpm - uses: pnpm/action-setup@v6 + - name: Enable Corepack + run: corepack enable + + - name: Verify pnpm version + run: pnpm --version - name: Get pnpm store directory shell: bash @@ -35,9 +38,9 @@ jobs: uses: actions/cache@v5 with: path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-v2-${{ hashFiles('**/pnpm-lock.yaml') }} + key: ${{ runner.os }}-pnpm-store-v3-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | - ${{ runner.os }}-pnpm-store-v2- + ${{ runner.os }}-pnpm-store-v3- - name: Install dependencies run: pnpm install --frozen-lockfile diff --git a/.github/workflows/validate-deps.yml b/.github/workflows/validate-deps.yml index 763ac8380..24f7c0c6e 100644 --- a/.github/workflows/validate-deps.yml +++ b/.github/workflows/validate-deps.yml @@ -27,8 +27,11 @@ jobs: with: node-version: '20' - - name: Install pnpm - uses: pnpm/action-setup@v6 + - name: Enable Corepack + run: corepack enable + + - name: Verify pnpm version + run: pnpm --version - name: Get pnpm store directory shell: bash @@ -39,9 +42,9 @@ jobs: uses: actions/cache@v5 with: path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-v2-${{ hashFiles('**/pnpm-lock.yaml') }} + key: ${{ runner.os }}-pnpm-store-v3-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | - ${{ runner.os }}-pnpm-store-v2- + ${{ runner.os }}-pnpm-store-v3- - name: Verify lockfile is up to date run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index cc9fee86a..44551ab01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Fixed +- **CI: Replace `pnpm/action-setup@v6` with corepack** — Switched all GitHub Actions workflows (`ci.yml`, `lint.yml`, `release.yml`, `validate-deps.yml`, `pr-automation.yml`) from `pnpm/action-setup@v6` to `corepack enable` to fix persistent `ERR_PNPM_BROKEN_LOCKFILE` errors. Corepack reads the exact `packageManager` field from `package.json` (including SHA verification), ensuring the correct pnpm version is used in CI. Also bumped pnpm store cache keys to v3 and added a pnpm version verification step. - **Broken pnpm lockfile** — Regenerated `pnpm-lock.yaml` from scratch to fix `ERR_PNPM_BROKEN_LOCKFILE` ("expected a single document in the stream, but found more") that was causing all CI jobs to fail. The previous merge of PR #1117 only included workflow cache key changes but did not carry over the regenerated lockfile. ### Added