Skip to content

Commit 13dac21

Browse files
committed
Try to use local blueprint file
1 parent 991ef2c commit 13dac21

2 files changed

Lines changed: 44 additions & 17 deletions

File tree

.github/workflows/playground.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ jobs:
1010
contents: read
1111
pull-requests: write
1212
actions: read
13-
env:
14-
LANDING_PAGE: "/wp-admin/"
1513

1614
steps:
1715
- uses: actions/checkout@v4
@@ -54,6 +52,20 @@ jobs:
5452
# Replace the version line
5553
sed -i "s/Version:[[:space:]]*[0-9.]*/Version: ${NEW_VERSION}/" "$PLUGIN_FILE"
5654
55+
- name: Prepare blueprint with artifact link
56+
id: blueprint
57+
run: |
58+
set -euxo pipefail
59+
ARTIFACT_URL="https://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/${{ github.event.repository.name }}.zip"
60+
61+
# Load blueprint and replace plugin name with artifact URL
62+
BLUEPRINT=$(cat .wordpress-org/blueprints/blueprint.json | sed "s/\"progress-planner\"/\"${ARTIFACT_URL}\"/g")
63+
64+
# Base64 encode the blueprint
65+
ENCODED_BLUEPRINT=$(echo -n "$BLUEPRINT" | base64 -w 0)
66+
67+
echo "blueprint=$ENCODED_BLUEPRINT" >> "$GITHUB_OUTPUT"
68+
5769
# Upload the FOLDER (not a .zip). The artifact service zips it for us,
5870
# keeping the top-level folder name inside the archive.
5971
- name: Upload plugin artifact
@@ -69,5 +81,5 @@ jobs:
6981
with:
7082
message: |
7183
**Test on Playground**
72-
[Test this pull request on the Playground](https://playground.wordpress.net/?blueprint-url=https%3A%2F%2Fprogressplanner.com%2Fresearch%2Fblueprint-pp2.php%3Frepo%3D${{ github.repository }}%26run%3D${{ github.run_id }})
84+
[Test this pull request on the Playground](https://playground.wordpress.net/?blueprint=${{ steps.blueprint.outputs.blueprint }})
7385
or [download the zip](https://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/${{ github.event.repository.name }}.zip)
Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,31 @@
11
{
2-
"landingPage": "\/wp-admin\/admin.php?page=progress-planner",
3-
"steps": [
4-
{
5-
"step": "login",
6-
"username": "admin",
7-
"password": "password"
8-
},
9-
{
10-
"step": "defineWpConfigConsts",
11-
"consts": {
12-
"IS_PLAYGROUND_PREVIEW": true
13-
}
14-
}
15-
]
2+
"landingPage": "/wp-admin/admin.php?page=progress-planner",
3+
"features": {
4+
"networking": true
5+
},
6+
"plugins": [
7+
"progress-planner",
8+
"wordpress-seo"
9+
],
10+
"steps": [
11+
{
12+
"step": "login"
13+
},
14+
{
15+
"step": "setSiteOptions",
16+
"options": {
17+
"wpseo": "a:5:{s:22:\"show_onboarding_notice\";b:0;s:36:\"dismiss_configuration_workout_notice\";b:1;s:18:\"first_time_install\";b:0;s:34:\"activation_redirect_timestamp_free\";i:1652258756;s:34:\"should_redirect_after_install_free\";b:0;}"
18+
}
19+
},
20+
{
21+
"step": "defineWpConfigConsts",
22+
"consts": {
23+
"IS_PLAYGROUND_PREVIEW": true,
24+
"WPSEO_PREMIUM_FILE": "override",
25+
"WPSEO_PREMIUM_VERSION": "24.8.1",
26+
"YOAST_ENVIRONMENT": "development",
27+
"WP_ENVIRONMENT_TYPE": "development"
28+
}
29+
}
30+
]
1631
}

0 commit comments

Comments
 (0)