Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ updates:
prefix: "GH Actions:"
labels:
- "changelog: non-user-facing"
- "yoast cs/qa"
14 changes: 9 additions & 5 deletions .github/workflows/playground.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
jobs:
playground:
runs-on: ubuntu-latest
env:
PLUGIN_SLUG: yoast-comment-hacks
permissions:
contents: read
pull-requests: write
Expand Down Expand Up @@ -77,14 +79,14 @@ jobs:
id: blueprint
run: |
set -euxo pipefail
ARTIFACT_URL="https://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/${{ secrets.DOT_ORG_SLUG }}.zip"
ARTIFACT_URL="https://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/${{ env.PLUGIN_SLUG }}.zip"

# Use Node.js to parse, modify, and stringify the JSON
BLUEPRINT=$(node -e "
const fs = require('fs');
const blueprint = JSON.parse(fs.readFileSync('.wordpress-org/blueprints/playground.json', 'utf8'));
blueprint.plugins = blueprint.plugins.map(plugin =>
plugin === '${{ secrets.DOT_ORG_SLUG }}' ? '$ARTIFACT_URL' : plugin
plugin === '${{ env.PLUGIN_SLUG }}' ? '$ARTIFACT_URL' : plugin
);
console.log(JSON.stringify(blueprint));
")
Expand All @@ -97,17 +99,19 @@ jobs:
# Upload the FOLDER (not a .zip). The artifact service zips it for us,
# keeping the top-level folder name inside the archive.
- name: Upload plugin artifact
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@v7
with:
name: ${{ secrets.DOT_ORG_SLUG }}
name: ${{ env.PLUGIN_SLUG }}
path: ${{ steps.prep.outputs.PKG_DIR }}
# Optional: faster uploads for already-compressed assets
compression-level: 0

# Comment with a Playground link that installs from the artifact ZIP
- uses: mshick/add-pr-comment@v2
# Fork and Dependabot runs can build artifacts but cannot write PR comments.
if: github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' && github.event.pull_request.user.login != 'dependabot[bot]'
with:
message: |
**Test on Playground**
[Test this pull request on the Playground](https://playground.wordpress.net/#${{ steps.blueprint.outputs.blueprint }})
or [download the zip](https://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/${{ secrets.DOT_ORG_SLUG }}.zip)
or [download the zip](https://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/${{ env.PLUGIN_SLUG }}.zip)
Loading