Commit 85ce10ab4bc for woocommerce

commit 85ce10ab4bc9a4e35e43e7ae879152528c280bda
Author: Rostislav Wolný <1082140+costasovo@users.noreply.github.com>
Date:   Wed Jul 29 06:50:15 2026 +0200

    Fix package release failing on npm 12 by pinning npm to v11 (#67070)

    Pin npm to v11 in package release workflow

    npm 12 (now npm@latest) turned unknown CLI flags into a hard
    EUNKNOWNCONFIG error. pnpm <11 delegates publish to the npm CLI and
    forwards its own flags (e.g. --publish-branch) in the process, so the
    publish step fails before uploading anything. npm 11 only warns on
    these flags, and 11.5.1+ still provides the OIDC support the workflow
    needs.

diff --git a/.github/workflows/package-release.yml b/.github/workflows/package-release.yml
index 7a2790da8b7..d531d3bfa1f 100644
--- a/.github/workflows/package-release.yml
+++ b/.github/workflows/package-release.yml
@@ -34,5 +34,8 @@ jobs:

       - name: Execute script
         run: |
-          npm install -g npm@latest # Need NPM 11.5.1+ for OIDC support. pnpm publish passes through to npm.
+          # Need NPM 11.5.1+ for OIDC support: pnpm publish passes through to npm.
+          # Pinned to 11 because npm 12 hard-errors (EUNKNOWNCONFIG) on the pnpm-only
+          # flags (e.g. --publish-branch) that pnpm <11 forwards to npm.
+          npm install -g npm@11
           ./tools/package-release/bin/dev publish ${{ github.event.inputs.packages }} --branch=${{ github.ref_name }} ${{ ( github.event.inputs.dry_run == 'true' && '--dry-run' ) || '' }} --skip-install