From 253f3966dd95e13be1894d04adfa23d978dffca1 Mon Sep 17 00:00:00 2001 From: Nilambar Sharma Date: Mon, 27 Apr 2026 12:36:09 +0545 Subject: [PATCH 1/2] Use latest stable WP version for wp-since generation --- .github/workflows/generate-wp-functions-since-data.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/generate-wp-functions-since-data.yml b/.github/workflows/generate-wp-functions-since-data.yml index cf1eccf3c..ac45479fd 100644 --- a/.github/workflows/generate-wp-functions-since-data.yml +++ b/.github/workflows/generate-wp-functions-since-data.yml @@ -17,10 +17,18 @@ jobs: - name: Checkout plugin-check uses: actions/checkout@v6 + - name: Resolve latest stable WordPress version + id: wp + run: | + VERSION=$(curl -fsSL 'https://api.wordpress.org/core/version-check/1.7/' | jq -r '.offers[0].version') + echo "version=$VERSION" >> "$GITHUB_OUTPUT" + echo "Using WordPress $VERSION (latest stable from WordPress.org)" + - name: Checkout WordPress core uses: actions/checkout@v6 with: repository: WordPress/WordPress + ref: ${{ steps.wp.outputs.version }} path: wordpress-core - name: Set up PHP From ac32df441b9c5f9cadbdc7d16c8257fb8fb19423 Mon Sep 17 00:00:00 2001 From: Nilambar Sharma Date: Mon, 27 Apr 2026 14:21:16 +0545 Subject: [PATCH 2/2] Handle invalid VERSION --- .github/workflows/generate-wp-functions-since-data.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/generate-wp-functions-since-data.yml b/.github/workflows/generate-wp-functions-since-data.yml index ac45479fd..e0a728f19 100644 --- a/.github/workflows/generate-wp-functions-since-data.yml +++ b/.github/workflows/generate-wp-functions-since-data.yml @@ -21,6 +21,10 @@ jobs: id: wp run: | VERSION=$(curl -fsSL 'https://api.wordpress.org/core/version-check/1.7/' | jq -r '.offers[0].version') + if [ -z "$VERSION" ] || [ "$VERSION" = "null" ]; then + echo "::error::Failed to resolve WordPress version from API" + exit 1 + fi echo "version=$VERSION" >> "$GITHUB_OUTPUT" echo "Using WordPress $VERSION (latest stable from WordPress.org)"