From 3c4a935bd19504968437e381ebf446c5cf51be10 Mon Sep 17 00:00:00 2001 From: Niklas Gutberlet Date: Sun, 25 Oct 2026 20:45:09 +0100 Subject: [PATCH] Replace asset update with WordPress.org plugin page workflow The old assets-update workflow pushed readme.txt and .wordpress-org/ to WordPress.org on every push to main. With main becoming the built branch, that trigger no longer fits, and publishing should be a deliberate step anyway. The new workflow calls the inpsyde wordpress-org-plugin-page reusable workflow and only runs when dispatched manually. A dry run is the default, so a run only previews the SVN changes and the readme diff until DRY_RUN is turned off. The assets are validated (names, dimensions, sizes, blueprints) before anything is synced, and .wordpress-org/ is mirrored to SVN /assets. The readme is synced to the Stable tag and trunk only when SYNC_README is on. GIT_REF is the dispatched commit, never free text. The reusable workflow is pinned to the head of inpsyde/reusable-workflows#296 until that PR is merged. --- .github/workflows/assets-update.yml | 21 --------------- .../workflows/wordpress-org-plugin-page.yml | 27 +++++++++++++++++++ CONTRIBUTING.md | 9 +++++++ 3 files changed, 36 insertions(+), 21 deletions(-) delete mode 100644 .github/workflows/assets-update.yml create mode 100644 .github/workflows/wordpress-org-plugin-page.yml diff --git a/.github/workflows/assets-update.yml b/.github/workflows/assets-update.yml deleted file mode 100644 index 24a1711..0000000 --- a/.github/workflows/assets-update.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Plugin asset/readme update -permissions: - contents: read - pull-requests: write -on: - push: - branches: - - main -jobs: - trunk: - name: Push to trunk - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: WordPress.org plugin asset/readme update - uses: 10up/action-wordpress-plugin-asset-update@stable - env: - SLUG: multisyde - SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} - SVN_USERNAME: ${{ secrets.SVN_USERNAME }} - IGNORE_OTHER_FILES: true \ No newline at end of file diff --git a/.github/workflows/wordpress-org-plugin-page.yml b/.github/workflows/wordpress-org-plugin-page.yml new file mode 100644 index 0000000..c58f8cd --- /dev/null +++ b/.github/workflows/wordpress-org-plugin-page.yml @@ -0,0 +1,27 @@ +name: WordPress.org plugin page +on: + workflow_dispatch: + inputs: + SYNC_README: { type: boolean, default: true, description: 'Sync readme.txt to stable tag and trunk' } + SYNC_ASSETS: { type: boolean, default: true, description: 'Mirror .wordpress-org/ to SVN /assets' } + DRY_RUN: { type: boolean, default: true, description: 'Preview only, commit nothing' } +permissions: + contents: read +concurrency: + group: wordpress-org-svn + cancel-in-progress: false +jobs: + sync: + # Publish only what is merged; a feature branch must not reach the WordPress.org page. + if: github.ref == 'refs/heads/dev/main' + # TODO: switch to @main once inpsyde/reusable-workflows#296 is merged + uses: inpsyde/reusable-workflows/.github/workflows/wordpress-org-plugin-page.yml@5f6631624f456519cad02088afabcec7bb45ea4d + with: + SVN_PLUGIN_SLUG: multisyde + GIT_REF: ${{ github.sha }} # the dispatched ref; never free text + SYNC_README: ${{ inputs.SYNC_README }} + SYNC_ASSETS: ${{ inputs.SYNC_ASSETS }} + DRY_RUN: ${{ inputs.DRY_RUN }} + secrets: + SVN_USERNAME: ${{ secrets.SVN_USERNAME }} + SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5edf774..06b6331 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -124,6 +124,15 @@ If you run into bugs or want to suggest an improvement: We follow the WordPress Community Code of Conduct. Be respectful and inclusive in all your interactions. +## WordPress.org plugin page + +The readme and the assets in `.wordpress-org/` are not published automatically. To update them between releases: +1. Merge the change to `dev/main`. +2. Run the **WordPress.org plugin page** workflow from `dev/main` with `DRY_RUN` on (the default), and review the SVN changes and the readme diff in the run summary. +3. Run it again with `DRY_RUN` off to publish. + +`SYNC_README` and `SYNC_ASSETS` select what gets synced. The readme goes to the `Stable tag` and to trunk, and `.wordpress-org/` is mirrored to SVN `/assets`, so files removed from Git are removed from WordPress.org too. + --- Thanks for helping improve MultiSyde! ❤️