Skip to content
Open
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
35 changes: 35 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "Deploy to WordPress.org and create release on GitHub"

on:
push:
tags:
- "v*"

jobs:
tag:
name: New tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: WordPress Plugin Deploy
uses: 10up/action-wordpress-plugin-deploy@stable
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
# SLUG: pp-disable-xml-rpc # optional, remove if GitHub repo name matches SVN slug, including capitalization
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
59 changes: 59 additions & 0 deletions .github/workflows/playground.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Playground Comment

on:
pull_request:

jobs:
playground:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
actions: read
env:
LANDING_PAGE: "/wp-admin/"

steps:
- uses: actions/checkout@v4

# Prepare a folder named exactly like the repo as the plugin root.
# If the repo already has such a folder (common for WP plugins), use it.
# Otherwise, stage one and copy root files into it (excluding CI junk).
- name: Prepare plugin folder
id: prep
run: |
set -euxo pipefail
REPO="${{ github.event.repository.name }}"
if [ -d "$REPO" ]; then
# Plugin already lives in a subfolder named like the repo
echo "PKG_DIR=$REPO" >> "$GITHUB_OUTPUT"
else
# Create a clean staging dir to avoid copying into itself
STAGE="${REPO}-pkg"
mkdir -p "$STAGE/$REPO"
rsync -a \
--exclude='.git' \
--exclude='.github' \
--exclude='node_modules' \
--exclude="${STAGE}" \
./ "$STAGE/$REPO/"
echo "PKG_DIR=$STAGE/$REPO" >> "$GITHUB_OUTPUT"
fi

# 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@v4
with:
name: ${{ github.event.repository.name }}
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
with:
message: |
**Test on Playground**
[Test this pull request on the Playground](https://playground.wordpress.net/#{"landingPage":"${{ env.LANDING_PAGE }}","features":{"networking":true},"steps":[{"step":"defineWpConfigConsts","consts":{"IS_PLAYGROUND_PREVIEW":true}},{"step":"login","username":"admin","password":"password"},{"step":"installPlugin","pluginZipFile":{"resource":"url","url":"https://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/${{ github.event.repository.name }}.zip"},"options":{"activate":true}}]})
or [download the zip](https://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/${{ github.event.repository.name }}.zip)
Binary file added .wordpress.org/banner-1544x500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress.org/banner-772x250.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress.org/icon-128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress.org/icon-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .wordpress.org/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.