diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..6dad457 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -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 diff --git a/.github/workflows/playground.yml b/.github/workflows/playground.yml new file mode 100644 index 0000000..2539fa9 --- /dev/null +++ b/.github/workflows/playground.yml @@ -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) diff --git a/.wordpress.org/banner-1544x500.png b/.wordpress.org/banner-1544x500.png new file mode 100644 index 0000000..9823b76 Binary files /dev/null and b/.wordpress.org/banner-1544x500.png differ diff --git a/.wordpress.org/banner-772x250.png b/.wordpress.org/banner-772x250.png new file mode 100644 index 0000000..afa802c Binary files /dev/null and b/.wordpress.org/banner-772x250.png differ diff --git a/.wordpress.org/icon-128x128.png b/.wordpress.org/icon-128x128.png new file mode 100644 index 0000000..727530a Binary files /dev/null and b/.wordpress.org/icon-128x128.png differ diff --git a/.wordpress.org/icon-256x256.png b/.wordpress.org/icon-256x256.png new file mode 100644 index 0000000..eec0424 Binary files /dev/null and b/.wordpress.org/icon-256x256.png differ diff --git a/.wordpress.org/icon.svg b/.wordpress.org/icon.svg new file mode 100644 index 0000000..180bb6a --- /dev/null +++ b/.wordpress.org/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file