Skip to content

Commit 1acd232

Browse files
davidperezgarernilambarmukeshpanchal27davidperezgar
authored
Merge pull request #1281 from WordPress/use-latest-stable-for-since-generation
Use latest stable WP version for wp-since generation Co-authored-by: ernilambar <nilambar@git.wordpress.org> Co-authored-by: mukeshpanchal27 <mukesh27@git.wordpress.org> Co-authored-by: davidperezgar <davidperez@git.wordpress.org>
2 parents d573e11 + ac32df4 commit 1acd232

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/generate-wp-functions-since-data.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,22 @@ jobs:
1717
- name: Checkout plugin-check
1818
uses: actions/checkout@v6
1919

20+
- name: Resolve latest stable WordPress version
21+
id: wp
22+
run: |
23+
VERSION=$(curl -fsSL 'https://api.wordpress.org/core/version-check/1.7/' | jq -r '.offers[0].version')
24+
if [ -z "$VERSION" ] || [ "$VERSION" = "null" ]; then
25+
echo "::error::Failed to resolve WordPress version from API"
26+
exit 1
27+
fi
28+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
29+
echo "Using WordPress $VERSION (latest stable from WordPress.org)"
30+
2031
- name: Checkout WordPress core
2132
uses: actions/checkout@v6
2233
with:
2334
repository: WordPress/WordPress
35+
ref: ${{ steps.wp.outputs.version }}
2436
path: wordpress-core
2537

2638
- name: Set up PHP

0 commit comments

Comments
 (0)