From b7a01e19d516bf795f794fc544559795fc8211b1 Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Mon, 18 Dec 2023 15:34:03 -0700 Subject: [PATCH 1/5] Add a blueprint.json file that is used to generate a preview environment. Also fix up our asset deploy action --- .../update-asset-readme-on-wordpress-org.yml | 8 +++++- .wordpress-org/blueprints/blueprint.json | 26 +++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .wordpress-org/blueprints/blueprint.json diff --git a/.github/workflows/update-asset-readme-on-wordpress-org.yml b/.github/workflows/update-asset-readme-on-wordpress-org.yml index 485b896..62b0882 100644 --- a/.github/workflows/update-asset-readme-on-wordpress-org.yml +++ b/.github/workflows/update-asset-readme-on-wordpress-org.yml @@ -1,18 +1,24 @@ name: Update asset/readme on WordPress.org + on: push: branches: - trunk + jobs: trunk: name: Push to trunk runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - name: Checkout code + uses: actions/checkout@v4 + - name: Build run: | npm install npm run build + composer install --no-dev + - name: WordPress.org plugin asset/readme update uses: 10up/action-wordpress-plugin-asset-update@stable env: diff --git a/.wordpress-org/blueprints/blueprint.json b/.wordpress-org/blueprints/blueprint.json new file mode 100644 index 0000000..e52cba2 --- /dev/null +++ b/.wordpress-org/blueprints/blueprint.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://playground.wordpress.net/blueprint-schema.json", + "landingPage": "\/wp-admin\/admin.php?page=block-for-apple-maps", + "preferredVersions": { + "php": "7.4", + "wp": "latest" + }, + "phpExtensionBundles": ["kitchen-sink"], + "steps": [ + { + "step": "login", + "username": "admin", + "password": "password" + }, + { + "step": "installPlugin", + "pluginZipFile": { + "resource": "wordpress.org\/plugins", + "slug": "maps-block-apple" + }, + "options": { + "activate": true + } + } + ] +} From c13ea4608a09909a8e57fb69dfb4039d92d44dcc Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Mon, 18 Dec 2023 15:51:46 -0700 Subject: [PATCH 2/5] Add demo data --- .wordpress-org/blueprints/demo-data.xml | 102 ++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 .wordpress-org/blueprints/demo-data.xml diff --git a/.wordpress-org/blueprints/demo-data.xml b/.wordpress-org/blueprints/demo-data.xml new file mode 100644 index 0000000..fccf7d4 --- /dev/null +++ b/.wordpress-org/blueprints/demo-data.xml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + My WordPress Website + https://playground.wordpress.net/ + + Mon, 18 Dec 2023 22:50:04 +0000 + en-US + 1.2 + https://playground.wordpress.net/ + https://playground.wordpress.net/ + + 1 + + + 1 + + + + + + 2 + + + + + + + 1 + + + + + + + https://wordpress.org/?v=6.4.2 + + <![CDATA[Apple Maps Block Demo]]> + https://playground.wordpress.net//?p=4 + Mon, 18 Dec 2023 22:49:54 +0000 + + https://playground.wordpress.net//?p=4 + + +

This is a demo of the Apple Maps block. You'll need to enter valid credentials in the block below in order to test.

+ + + +
+]]>
+ + 4 + + + + + + + + + 0 + 0 + + + 0 + + + + + + + + + + +
+
From 385fb9705624c2fe6822ac399ed08f09a5e80388 Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Mon, 18 Dec 2023 15:58:02 -0700 Subject: [PATCH 3/5] Update demo data --- .wordpress-org/blueprints/demo-data.xml | 42 +++++++------------------ 1 file changed, 11 insertions(+), 31 deletions(-) diff --git a/.wordpress-org/blueprints/demo-data.xml b/.wordpress-org/blueprints/demo-data.xml index fccf7d4..b525457 100644 --- a/.wordpress-org/blueprints/demo-data.xml +++ b/.wordpress-org/blueprints/demo-data.xml @@ -16,7 +16,7 @@ - + My WordPress Website https://playground.wordpress.net/ - Mon, 18 Dec 2023 22:50:04 +0000 + Mon, 18 Dec 2023 22:55:30 +0000 en-US 1.2 https://playground.wordpress.net/ @@ -37,34 +37,14 @@ 1 - - 1 - - - - - - 2 - - - - - - - 1 - - - - - https://wordpress.org/?v=6.4.2 - + <![CDATA[Apple Maps Block Demo]]> - https://playground.wordpress.net//?p=4 - Mon, 18 Dec 2023 22:49:54 +0000 + https://playground.wordpress.net/?p=6 + Mon, 18 Dec 2023 22:55:23 +0000 - https://playground.wordpress.net//?p=4 + https://playground.wordpress.net/?p=6

This is a demo of the Apple Maps block. You'll need to enter valid credentials in the block below in order to test.

@@ -74,11 +54,11 @@
]]>
- 4 - - - - + 6 + + + + From 5f811cebc6da523926391f6b5d001086198348b2 Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Tue, 19 Dec 2023 08:02:16 -0700 Subject: [PATCH 4/5] Update blueprint to import test data --- .wordpress-org/blueprints/blueprint.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.wordpress-org/blueprints/blueprint.json b/.wordpress-org/blueprints/blueprint.json index e52cba2..02c683f 100644 --- a/.wordpress-org/blueprints/blueprint.json +++ b/.wordpress-org/blueprints/blueprint.json @@ -1,6 +1,6 @@ { "$schema": "https://playground.wordpress.net/blueprint-schema.json", - "landingPage": "\/wp-admin\/admin.php?page=block-for-apple-maps", + "landingPage": "\/wp-admin\/post.php?post=6&action=edit", "preferredVersions": { "php": "7.4", "wp": "latest" @@ -21,6 +21,13 @@ "options": { "activate": true } + }, + { + "step": "importFile", + "file": { + "resource": "url", + "url": "https:\/\/raw.githubusercontent.com\/10up\/maps-block-apple\/385fb9705624c2fe6822ac399ed08f09a5e80388\/.wordpress-org/blueprints\/demo-data.xml" + } } ] } From 7e208198a3f0f88c6d65c9fba6f09ee5981c2273 Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Tue, 19 Dec 2023 08:18:33 -0700 Subject: [PATCH 5/5] Fix spacing --- .wordpress-org/blueprints/blueprint.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.wordpress-org/blueprints/blueprint.json b/.wordpress-org/blueprints/blueprint.json index 02c683f..8c955ab 100644 --- a/.wordpress-org/blueprints/blueprint.json +++ b/.wordpress-org/blueprints/blueprint.json @@ -22,11 +22,11 @@ "activate": true } }, - { + { "step": "importFile", "file": { "resource": "url", - "url": "https:\/\/raw.githubusercontent.com\/10up\/maps-block-apple\/385fb9705624c2fe6822ac399ed08f09a5e80388\/.wordpress-org/blueprints\/demo-data.xml" + "url": "https:\/\/raw.githubusercontent.com\/10up\/maps-block-apple\/385fb9705624c2fe6822ac399ed08f09a5e80388\/.wordpress-org/blueprints\/demo-data.xml" } } ]