From 05de466e821b646b3ac090ea5b743d6c3f76466f Mon Sep 17 00:00:00 2001 From: Pablo Ariel Di Loreto Date: Fri, 2 Oct 2026 13:00:01 +0000 Subject: [PATCH] fix(plugin-checks): install WP-CLI from its release by name, checked against its SHA-512 setup-php's tools: wp-cli asks for a release asset named wp-cli.phar, which wp-cli's releases do not carry: it answered 404 on 2 October 2026 and the i18n and translations jobs failed in every plugin. Both jobs download wp-cli-2.12.0.phar and verify the SHA-512 wp-cli publishes in wp-cli/builds. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/plugin-checks-wp.yml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/plugin-checks-wp.yml b/.github/workflows/plugin-checks-wp.yml index 5a65f50..54e6edc 100644 --- a/.github/workflows/plugin-checks-wp.yml +++ b/.github/workflows/plugin-checks-wp.yml @@ -185,7 +185,18 @@ jobs: with: php-version: '8.5' coverage: none - tools: wp-cli + # setup-php's `tools: wp-cli` asks for a release asset named wp-cli.phar, + # which wp-cli's releases do not carry (it answered 404 on 2 October 2026). The + # release is downloaded by name and checked against its SHA-512, the same + # value wp-cli publishes in wp-cli/builds (wp-cli-release.phar.sha512). + - name: WP-CLI 2.12.0 + env: + WP_CLI_SHA512: be928f6b8ca1e8dfb9d2f4b75a13aa4aee0896f8a9a0a1c45cd5d2c98605e6172e6d014dda2e27f88c98befc16c040cbb2bd1bfa121510ea5cdf5f6a30fe8832 + run: | + curl -fsSL -o "$RUNNER_TEMP/wp" https://github.com/wp-cli/wp-cli/releases/download/v2.12.0/wp-cli-2.12.0.phar + echo "$WP_CLI_SHA512 $RUNNER_TEMP/wp" | sha512sum -c - + sudo install -m 0755 "$RUNNER_TEMP/wp" /usr/local/bin/wp + wp --version - name: Build the shipped tree env: SLUG: ${{ inputs.slug }} @@ -354,7 +365,18 @@ jobs: with: php-version: '8.5' coverage: none - tools: wp-cli + # setup-php's `tools: wp-cli` asks for a release asset named wp-cli.phar, + # which wp-cli's releases do not carry (it answered 404 on 2 October 2026). The + # release is downloaded by name and checked against its SHA-512, the same + # value wp-cli publishes in wp-cli/builds (wp-cli-release.phar.sha512). + - name: WP-CLI 2.12.0 + env: + WP_CLI_SHA512: be928f6b8ca1e8dfb9d2f4b75a13aa4aee0896f8a9a0a1c45cd5d2c98605e6172e6d014dda2e27f88c98befc16c040cbb2bd1bfa121510ea5cdf5f6a30fe8832 + run: | + curl -fsSL -o "$RUNNER_TEMP/wp" https://github.com/wp-cli/wp-cli/releases/download/v2.12.0/wp-cli-2.12.0.phar + echo "$WP_CLI_SHA512 $RUNNER_TEMP/wp" | sha512sum -c - + sudo install -m 0755 "$RUNNER_TEMP/wp" /usr/local/bin/wp + wp --version - name: gettext run: sudo apt-get update -qq && sudo apt-get install -y -qq gettext - name: Every shipped locale complete