From 057df162dc787adcd5c6724c047387d2e72d0146 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20L=C3=B3pez=20Ariza?= <45979455+alopezari@users.noreply.github.com> Date: Mon, 18 Dec 2023 22:39:45 +0100 Subject: [PATCH] Bump pnpm version in the release-code-freeze.yml workflow to fix issue that impeded the creation of new WooCommerce zip packages. (#42919) * Bump pnpm version in the release-code-freeze.yml workflow to fix issue that impeded the creation of new WooCommerce zip packages. * Update code freeze workflow to automatically get the pnpm version from the root package.json file. * Improve reusability of the method to retrieve the pnpm version in the Code Freeze workflow. --- .github/workflows/release-code-freeze.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-code-freeze.yml b/.github/workflows/release-code-freeze.yml index 00d07c06ee4..70343da528e 100644 --- a/.github/workflows/release-code-freeze.yml +++ b/.github/workflows/release-code-freeze.yml @@ -31,6 +31,7 @@ jobs: issues: write pull-requests: write outputs: + pnpmVersion: ${{ steps.read-pnpm-version.outputs.version }} isTodayAcceleratedFreeze: ${{ steps.get-versions.outputs.isTodayAcceleratedFreeze }} isTodayMonthlyFreeze: ${{ steps.get-versions.outputs.isTodayMonthlyFreeze }} acceleratedVersion: ${{ steps.get-versions.outputs.acceleratedVersion }} @@ -46,10 +47,18 @@ jobs: with: fetch-depth: 0 + - name: Read PNPM Version + id: read-pnpm-version + shell: bash + run: | + version=$(./.github/actions/setup-woocommerce-monorepo/scripts/read-pnpm-version.sh package.json) + echo "version=$version" >> $GITHUB_OUTPUT + echo "PNPM Version: $version" + - name: Setup PNPM uses: pnpm/action-setup@c3b53f6a16e57305370b4ae5a540c2077a1d50dd with: - version: '8.6.7' + version: ${{ steps.read-pnpm-version.outputs.version }} - name: Setup Node uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c @@ -142,7 +151,7 @@ jobs: - name: Setup PNPM uses: pnpm/action-setup@c3b53f6a16e57305370b4ae5a540c2077a1d50dd with: - version: '8.6.7' + version: ${{ needs.code-freeze-prep.outputs.pnpmVersion }} - name: Setup Node uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c @@ -238,7 +247,7 @@ jobs: - name: Setup PNPM uses: pnpm/action-setup@c3b53f6a16e57305370b4ae5a540c2077a1d50dd with: - version: '8.6.7' + version: ${{ needs.code-freeze-prep.outputs.pnpmVersion }} - name: Setup Node uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c @@ -283,7 +292,7 @@ jobs: - name: Setup PNPM uses: pnpm/action-setup@c3b53f6a16e57305370b4ae5a540c2077a1d50dd with: - version: '8.6.7' + version: ${{ needs.code-freeze-prep.outputs.pnpmVersion }} - name: Setup Node uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c @@ -364,4 +373,4 @@ jobs: with: name: woocommerce.${{ needs.code-freeze-prep.outputs.acceleratedVersion }} path: zipfile - retention-days: 10 \ No newline at end of file + retention-days: 10