Skip to content

[PROD-196] Add reusable workflow for updating WordPress.org plugin page - #296

Merged
Biont merged 36 commits into
mainfrom
feature/PROD-196-wordpress-org-plugin-page
Nov 23, 2026
Merged

Biont merged 36 commits into
mainfrom
feature/PROD-196-wordpress-org-plugin-page

Conversation

@strangerkir

@strangerkir strangerkir commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Requested and pushed for by @InpsydeNiklas, who also wrote the initial version of this workflow, based on wordpress-org-release.yml.


Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Feature: a new reusable workflow, plus a docs correction in the release workflow docs.


What is the current behavior? (You can also link to an open issue here)

Changing a plugin's WordPress.org page without releasing a new version (promo links in readme.txt, a Tested up to bump, new banners or screenshots, a Playground blueprint) means committing to SVN by hand. That's error-prone and needs SVN knowledge. It also bypasses Git, so there's no review, and a readme change made only in SVN is overwritten by the next release.

The release docs also claimed that a readme change always needs a new tag. The WordPress.org FAQ allows it without a release.


What is the new behavior (if this is a feature change)?

New wordpress-org-plugin-page.yml, a sibling of wordpress-org-release.yml. The release workflow publishes new versions, and this one keeps the plugin page (readme and assets) in sync with Git between releases:

  • readme.txt is copied to the stable tag (what WordPress.org renders) and to trunk. Trunk is left alone if it holds unreleased changes, such as a trunk preview from the release workflow.
  • Assets (banners, icons, screenshots, blueprints) are mirrored from .wordpress-org/ to SVN /assets.
  • It never releases anything. It never creates tags, changes the Stable tag, or touches plugin code. A sparse SVN checkout and a scope guard enforce this.
  • Mistakes are caught before publishing. Asset names, sizes, real image format and dimensions, and blueprint JSON are validated against the WordPress.org rules plus a few stricter rules of our own. A run that would remove the last icon or banner from the page fails, which catches an incomplete assets directory.
  • Dry run is the default. The run summary shows the changes, removed files are listed separately, and the artifact contains exactly what would be committed.
  • Re-running is safe. The commit is atomic, and a run without changes succeeds.

See docs/wordpress-org-plugin-page.md for usage and adoption steps.


⚠️ Open question: plugins with Release Confirmation

Please weigh in on this one.

For plugins with Release Confirmation enabled, the handbook says released tags can't be altered, including the readme. Syncing readme.txt into the stable tag is therefore not officially supported for those plugins. Asset-only syncs don't touch tags and aren't affected.

The importer code suggests it does work: a changed tag reopens the release for confirmation. All committers get the email again, and the page updates once someone confirms. That behavior is undocumented, though, and may change.

Current approach: the docs mark this as unsupported and use-at-your-own-risk, and the workflow shows a notice whenever the tag readme changes. No extra input or guard, because whoever enables SYNC_README should know whether their plugin uses Release Confirmation. Open to other opinions.


Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

No. This PR only adds a new workflow; existing workflows are unchanged.


Security impact

What changed (security perspective): A new workflow commits to WordPress.org SVN with the existing SVN_USERNAME / SVN_PASSWORD secrets. Its write scope is limited to /assets and the two readme files, depending on the enabled options. Anything else fails the run before committing. The password is passed via stdin, not as a command-line argument.

Testing done:

  • actionlint (including shellcheck) and the markdown lint pass
  • Every step ran locally in Docker against a local SVN repository:
    • dry runs and live runs, including readme-only, assets-only, and a plugin without /assets yet
    • idempotent re-runs
    • trunk preview handling
    • scope guard violations
    • a concurrent commit
    • invalid assets of every kind
    • a Stable tag mismatch
  • Not done yet: a run on GitHub Actions and against WordPress.org

Residual risk (link Jira if any): Mirroring deletes SVN assets that aren't in Git. The adoption steps in the docs require importing the current assets and a dry run first. Readme sync for Release Confirmation plugins is the open question above.


Other information

The dry-run artifact contains only what would be committed. The diff and status are in the run summary. This differs from the original PROD-196 acceptance criteria.

- sync readme.txt to the Stable tag and trunk without a release
- mirror the assets directory to SVN /assets
- validate asset names, sizes, image format and dimensions, blueprints
- fail on changes outside the plugin page files
- show changes in the job summary
- dry run by default, artifact contains only what would be committed
- document inputs, asset rules, dry run and troubleshooting
- link the workflow from README and the release docs
- correct the release docs note on readme changes requiring a new tag
- suggest excluding the assets directory via .distignore
- show a notice when the stable tag's readme.txt changes
- document that a tag change reopens the release for confirmation
- note that asset-only runs are not affected
- quote the handbook: released tags can't be altered
- describe the importer behavior as undocumented, use at own risk
- mention that the release ZIP may not be rebuilt
- allow the same characters as the WordPress.org readme parser
- accept versions like 1.2.3.4, 1.0.0-rc1, v1.2
- reject '..' since the value is used in SVN paths
lloc pushed a commit to inpsyde/multisyde that referenced this pull request Oct 26, 2026
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.
lloc pushed a commit to inpsyde/multisyde that referenced this pull request Oct 26, 2026
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.
lloc pushed a commit to inpsyde/multisyde that referenced this pull request Oct 27, 2026
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.
- the lowercase rule applies to banners, icons, and screenshots only
- the locale region and blueprint names may contain uppercase letters
- drop the lowercase rule for banners, icons, and screenshots
- keep blueprints and icon.svg case-sensitive, like the importer and template
- reject names that differ only in case
- map uppercase extensions to the correct format and mime type
- WordPress blocks installs and updates based on these values
- the main plugin file's headers take precedence over readme.txt
- repeat the trunk warning in the job summary, where it's harder to miss
- mention the summary in the trunk previews docs
- reject added or deleted readmes and property-only readme changes
- explain why any file in /assets may be deleted
- a run without changes is not an error
- a re-run with a branch as GIT_REF uses the branch's current state
Syncing on every push can publish plugin page changes as an unexpected
side effect of merging, so the docs no longer suggest it.
- fail if mirroring would leave the plugin page without an icon or banner
- warn if it removes all screenshots
- catches an incomplete assets directory before anything is committed
@strangerkir strangerkir changed the title [PROD-196] wordpress org plugin page [PROD-196] Add reusable workflow for updating wordpress org plugin page Oct 29, 2026
@strangerkir strangerkir changed the title [PROD-196] Add reusable workflow for updating wordpress org plugin page [PROD-196] Add reusable workflow for updating WordPress.org plugin page Oct 29, 2026
@strangerkir
strangerkir marked this pull request as ready for review October 29, 2026 09:56
@strangerkir
strangerkir requested a review from a team as a code owner October 29, 2026 09:56
InpsydeNiklas added a commit to inpsyde/multisyde that referenced this pull request Oct 30, 2026
lloc pushed a commit to inpsyde/multisyde that referenced this pull request Oct 30, 2026
* 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.

* Pin plugin page workflow to the latest inpsyde/reusable-workflows#296 head

@Biont Biont left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this is careful work. The scope guard, sparse checkout, --password-from-stdin, LFS detection and the icon/banner removal guard go beyond what a minimal implementation would need. One thing blocks the merge for me: the docs don't warn that a development branch can publish an unreleased changelog. Everything else is a non-blocking cleanup.

docs/wordpress-org-plugin-page.md:75 – unreleased readme content

issue (blocking, docs): Following the docs as written, SYNC_README from a development branch can publish the next version's changelog.

The only content check on readme.txt is that Stable tag matches the published version. The release docs tell teams to keep Stable tag on the last published version until they release (docs/wordpress-org-release.md:127), so during development a typical develop branch looks like this:

=== My Plugin ===
Stable tag: 1.2.3          ← still the published version, so the check passes
Tested up to: 6.8

== Changelog ==

= 1.3.0 =                  ← not released yet
* New: Apple Pay support
* Fix: Refund rounding

= 1.2.3 =
* Fix: ...

Someone bumps Tested up to: 6.9 on develop and runs the workflow with GIT_REF: develop. The check passes, and the whole file is copied into tags/1.2.3/readme.txt, which is what WordPress.org renders. The plugin page now shows a 1.3.0 changelog entry for a version nobody can install, and possibly an upgrade notice or FAQ entries for features the released code doesn't have. Nothing in the run flags it. The readme diff in the job summary shows it, but only to someone who reads it closely.

The docs should:

  1. Warn that a development branch can pass the Stable tag check and still contain unreleased content.

  2. Recommend a branch cut from the release tag, which holds exactly the released readme plus the one change:

    git switch -c plugin-page/tested-up-to-6.9 v1.2.3
    # edit readme.txt: "Tested up to: 6.9"
    git commit -am "Bump Tested up to 6.9"
    git push -u origin HEAD

    Run with GIT_REF: plugin-page/tested-up-to-6.9 and check the readme diff in the dry run. Then run again with DRY_RUN: false, and merge the change into develop so the next release keeps it.

  3. Fix the wording at :75: "the Git tag of the latest release plus the cosmetic change" doesn't work as written, because you can't add a change to a tag. You need a branch made from it.

The MultiSyde test caller (inpsyde/multisyde#69) is already set up this way. Following the advice at :102, it passes GIT_REF: ${{ github.sha }} and only runs from dev/main, its development branch. That's safe today, because the readme on dev/main still matches tags/1.2.0 (the readme diff in the test run is empty). The first 1.3.0 changelog entry on dev/main changes that. So the recipe should also show how to combine the branch restriction with a branch cut from the release tag, e.g. if: startsWith(github.ref, 'refs/heads/plugin-page/').

.github/workflows/wordpress-org-plugin-page.yml:479 – svn:mime-type for blueprints

issue (minor): application/json makes SVN store blueprints as binary.

In the MultiSyde live run, SVN warned about this and committed the blueprint as Adding (bin) assets/blueprints/blueprint.json:

svn: warning: 'application/json' is a binary mime-type but file '…/assets/blueprints/blueprint.json' looks like text; diff, merge, blame, and other operations will stop working on this file

The import still works, because the importer reads blueprints with svn export, which ignores the MIME type. The cost is that every later blueprint change shows up as a binary file in svn diff and on plugins.trac.wordpress.org, so neither we nor the plugin review team can see what changed. The MIME types are there so browsers display images (:471), and nobody opens a blueprint in a browser. Drop the *.json case: svn add already detects JSON as text and sets no MIME type.

.github/workflows/wordpress-org-plugin-page.yml:424 – Release Confirmation (re: open question)

suggestion (non-blocking): Keep the current approach (document it, show a notice), with two small changes.

I read the importer commit you linked (8d1727f, "Re-confirm a released tag when its code changes on re-import"). The behavior is deliberate, not a bug. Any commit to a tag after its release was approved reopens confirmation, emails all committers again, restarts the release cooldown, and resets the release ZIP so it is rebuilt. Nothing exempts readme-only commits, which makes sense: the readme ships in the ZIP, and its Requires and Tested up to headers affect who is offered updates.

There's nothing to work around on our side. The page renders from the tag's readme, so any readme change either commits to the tag or changes Stable tag, which would be a release. Assets aren't in any tag and are unaffected. So I agree with not adding an input or a guard.

  1. Repeat the notice in the job summary, as for the trunk warning (:440). ::notice is the easiest annotation to miss, and on a live run the commit has already happened by the time anyone reads it.
  2. docs/wordpress-org-plugin-page.md:136: replace "It's also unclear whether the downloadable ZIP of the release is rebuilt" with what the code does: the reset marks the ZIP as not built, and it's rebuilt after the release is confirmed again.

.github/workflows/wordpress-org-plugin-page.yml:138 and :175 – symlinks

issue (security, minor): A symlinked readme.txt or ASSETS_DIR is followed outside the repository.

[ -f readme.txt ] and cp (:428) follow symlinks, so readme.txt -> /etc/… (or any file on the runner) would be published publicly to SVN. The same applies to ASSETS_DIR itself, or one of its parents, being a symlink: the regex at :111 doesn't stop that, despite its comment, and rsync follows a trailing-slash source. Asset files still have to pass the image checks, so the readme is the realistic path. The release workflow doesn't have this problem, because rsync -r without -l skips symlinks.

# Validate readme.txt
if [ -L readme.txt ]; then
  echo "❌ readme.txt must not be a symlink"
  exit 1
fi

# Validate assets directory
REAL_ASSETS_DIR=$(realpath -e "$ASSETS_DIR")
if [[ "$REAL_ASSETS_DIR/" != "$GITHUB_WORKSPACE/"* ]]; then
  echo "❌ ASSETS_DIR resolves outside the repository: $ASSETS_DIR"
  exit 1
fi

.github/workflows/wordpress-org-plugin-page.yml:50 – concurrency

suggestion: Serialize SVN writes per plugin instead of only reporting the concurrent commit afterwards.

There's precedent in build-and-distribute.yml:96:

jobs:
  update_plugin_page:
    concurrency:
      group: wordpress-org-svn-${{ inputs.SVN_PLUGIN_SLUG }}
      cancel-in-progress: false

If the release workflow uses the same group (follow-up), a page run started during a release waits for it, then fails the Stable tag check with a clear message instead of the SVN error at :696. Groups only apply within one repository, which matches the one-repo-per-plugin setup, so keep the error handling as well.

.github/workflows/wordpress-org-plugin-page.yml:143, :366, :396 – Stable tag parsing

suggestion: Use one parser that matches WordPress.org's for all three uses.

The workflow parses readme headers three times, with two different sed expressions. On every line the grep matches, they return the same value, so sharing readme_header wouldn't change any result. But grep -m1 across the whole file isn't how WordPress.org reads headers. Its Readme_Parser reads only the header block, before the first == Section ==. It ignores *, - and spaces around the key and value, and when a header appears twice, the last one wins.

Where the two differ:

readme.txt WordPress.org grep -m1 Effect
**Stable tag:** 1.2.3 or Stable tag : 1.2.3 1.2.3 none False failure, nothing committed
Stable tag: "1.2.3" or tags/1.2.3 in SVN trunk 1.2.3 raw value False mismatch, nothing committed
No Stable tag in the header block, but Stable tag: 1.2.3 further down none 1.2.3 Readme written to a tag WordPress.org doesn't serve
Two Stable tag lines in the header (1.2.2, then 1.2.3) 1.2.3 1.2.2 Readme written to an old tag, and with Release Confirmation that old release is reopened

From a security point of view it's safe in all three places. The Git value is validated before it's used in a path (:160). The SVN value is only compared for equality. The Requires values only end up in a one-line warning. Every case is also limited by the scope guard. The last two rows are the problem: the run succeeds, but the change doesn't show up on the page. Both are unlikely, but this parser is easy to replace:

# Mirrors WordPress.org's Readme_Parser: header block only, case-insensitive key,
# surrounding spaces, "*" and "-" ignored, the last occurrence wins.
readme_header() {
  awk -v key="${1,,}" '
    { sub(/\r$/, "") }
    /^==[^=]/ { exit }
    index($0, ":") {
      k = tolower(substr($0, 1, index($0, ":") - 1))
      v = substr($0, index($0, ":") + 1)
      gsub(/^[ \t*-]+|[ \t*-]+$/, "", k)
      gsub(/^[ \t*<>-]+|[ \t*<>-]+$/, "", v)
      if (k == key) value = v
    }
    END { print value }
  ' "$2"
}

STABLE_TAG=$(readme_header "Stable tag" readme.txt)                # :143
SVN_STABLE_TAG=$(readme_header "Stable tag" trunk/readme.txt)      # :366

This returns WordPress.org's value in all of the cases above, including CRLF line endings and * Stable tag: bullets. It returns an empty string (which fails the existing checks) when the header block has no Stable tag. It doesn't copy WordPress.org's value cleanup (quotes, tags/ prefix), so those cases still fail closed. That's fine.

.github/workflows/wordpress-org-plugin-page.yml:508 – default asset patterns

suggestion: count_assets adds a fourth set of filename patterns, even though the comment at :57 says the patterns are shared "so they can't drift apart".

Move them to the job env next to the others:

DEFAULT_ICON_RE: '^icon-(128x128|256x256)\.(png|jpg|jpeg|gif)$'
DEFAULT_BANNER_RE: '^banner-(772x250|1544x500)\.(png|jpg|jpeg|gif)$'
DEFAULT_SCREENSHOT_RE: '^screenshot-[0-9]+\.(png|jpg|jpeg|gif)$'

.github/workflows/wordpress-org-plugin-page.yml:689 – reuse with wordpress-org-release.yml

suggestion (non-blocking, follow-up): Extract only the SVN commit into .github/actions/wporg-svn-commit.

The commit handles the credentials, and the two workflows have already drifted apart there: the release workflow still passes --password in argv (wordpress-org-release.yml:305) and doesn't recognize a concurrent commit. The other duplicated parts aren't worth an action. Slug and ref validation (:92, :100) and the delete-missing loop (:461) are a few lines each. The checkouts differ on purpose (full trunk vs. sparse readme), and so does the no-changes handling.

The action takes svn-root, paths (newline-separated), message, username and password, and outputs revision for the job summary link. Follow setup-git for conventions, and pass inputs through env:

runs:
  using: composite
  steps:
    - id: commit
      shell: bash
      working-directory: ${{ inputs.svn-root }}
      env:
        SVN_USERNAME: ${{ inputs.username }}
        SVN_PASSWORD: ${{ inputs.password }}
        COMMIT_PATHS: ${{ inputs.paths }}
        COMMIT_MESSAGE: ${{ inputs.message }}
      run: |
        set -euo pipefail
        mapfile -t PATHS < <(grep -v '^[[:space:]]*$' <<< "$COMMIT_PATHS")
        LOG="${RUNNER_TEMP}/svn-commit.log"
        if ! printf '%s' "$SVN_PASSWORD" | svn commit "${PATHS[@]}" \
          --username "$SVN_USERNAME" --password-from-stdin \
          --no-auth-cache --non-interactive \
          -m "$COMMIT_MESSAGE" 2>&1 | tee "$LOG"; then
          if grep -qE 'E160028|E160024|out of date' "$LOG"; then
            echo "::error title=Concurrent SVN commit::Someone else committed in the meantime. Re-run once the other run has finished."
          fi
          exit 1
        fi
        echo "revision=$(grep -oP 'Committed revision \K[0-9]+' "$LOG" || true)" >> "$GITHUB_OUTPUT"

Reusable workflows can't use ./.github/actions/… (it resolves against the caller's repository), so this follows the existing SHA-pinned pattern in two PRs:

  1. Add the action and its README.
  2. Switch both workflows to inpsyde/reusable-workflows/.github/actions/wporg-svn-commit@<sha> # main, and port persist-credentials: false to the release workflow. Test it with a release dry run plus one live trunk-only release.

It doesn't need to block this PR.

.github/workflows/wordpress-org-plugin-page.yml:36 – DRY_RUN default

question (non-blocking): This workflow defaults to true and the release workflow to false.

true is the safer default, and the docs call it out (:77). Still, someone who copies a caller from one sibling to the other gets the opposite behavior. Should we align the release workflow later (a breaking change, separate PR), or is this intentional?

.github/workflows/wordpress-org-plugin-page.yml:639 and :701 – job summary

suggestion: Make it obvious from the summary whether anything was published.

The "SVN changes" summary looks the same for dry and live runs, and the success message only goes to the log. Mark dry runs in the heading, and link the commit on live runs:

# Show SVN changes (needs DRY_RUN in env)
if [ "$DRY_RUN" = "true" ]; then
  echo '### SVN changes (dry run, nothing committed)'
else
  echo '### SVN changes'
fi

# Commit changes (needs SVN_PLUGIN_SLUG in env)
REVISION=$(grep -oP 'Committed revision \K[0-9]+' "$COMMIT_LOG" || true)
{
  echo "✅ Committed [r$REVISION](https://plugins.trac.wordpress.org/changeset/$REVISION)."
  echo "[Plugin page](https://wordpress.org/plugins/$SVN_PLUGIN_SLUG/) may take a while to update (CDN cache)."
} >> "$GITHUB_STEP_SUMMARY"

The MultiSyde runs show two more small things, and both make a run look like it changed more than it did:

  • Readme messages: :429 and :433 print "✅ Updated tags/1.2.0/readme.txt" and "✅ Updated trunk/readme.txt" even when the content is identical, as it was in the MultiSyde run. Print "already up to date" when cmp finds no difference.
  • Empty diff: when neither readme changes, the summary still shows a "readme.txt diff" heading with an empty block. Skip the section when svn diff returns nothing.

docs/wordpress-org-plugin-page.md – readability and everyday use cases

suggestion: The content is accurate and complete, but it's organized around how the workflow works, not around what people want to do.

What works: the "use it for" list at the top, the "never releases" box, the adoption steps, and the asset table.

What I'd change:

  1. Steps list (:15–:26): Ten implementation steps open the doc, and item 6 alone is about 70 words. Cut it to four bullets (validate, check Stable tag, sync, dry run or commit) and leave the details to the sections below, which already cover them.

  2. No recipes. The use cases listed at the top have no matching instructions. Add a "Common tasks" section:

    Task Change in Git SYNC_README SYNC_ASSETS
    Bump Tested up to, add or remove a promo link readme.txt on a branch cut from the release tag (see above) true false
    Campaign banner Replace banner-*.png in .wordpress-org/ false true
    Revert campaign banner git revert the banner commit false true
    New screenshots screenshot-N.png and caption in == Screenshots == true true
    Playground preview blueprints/blueprint.json, then set public in Advanced View false true
    Keep assets current after each release none false true (chained job, below)
  3. Chaining after a release. The release workflow excludes .wordpress-org/, so assets drift unless someone remembers to run this one. Add an example:

    jobs:
      release:
        uses: inpsyde/reusable-workflows/.github/workflows/wordpress-org-release.yml@main
        with:
          SVN_PLUGIN_SLUG: my-plugin
          PLUGIN_VERSION: ${{ inputs.PLUGIN_VERSION }}
          GIT_REF: ${{ inputs.GIT_REF }}
          UPDATE_TRUNK_ONLY: false
        secrets: inherit
      plugin-page:
        needs: release
        uses: inpsyde/reusable-workflows/.github/workflows/wordpress-org-plugin-page.yml@main
        with:
          SVN_PLUGIN_SLUG: my-plugin
          GIT_REF: ${{ inputs.GIT_REF }}
          SYNC_README: false # the release already published readme.txt
          DRY_RUN: false
        secrets: inherit
  4. Troubleshooting (:206) is a single paragraph of about 120 words covering four cases. Turn it into a symptom → fix list: Stable tag mismatch, asset rejected, concurrent SVN commit, trunk left unchanged, and page not updated (CDN cache, or Release Confirmation pending).

  5. :109: svn export fails if .wordpress-org already exists. Add --force or say "into a new directory".

  6. :102: Also mention that refs/pull/<n>/head is a valid GIT_REF, so a fork's PR content can be published by anyone allowed to dispatch the workflow.

  7. :133: "release cooldown" isn't explained or linked.

.github/workflows/wordpress-org-plugin-page.yml:556 – scope guard

praise: The allow-list over svn status, combined with the sparse checkout, makes "never touches code" a property you can verify, not just a promise. The same goes for detecting LFS pointers through the format check (:266) and rejecting names that differ only in case (:218).

strangerkir and others added 10 commits November 5, 2026 17:58
A development branch usually still carries the published Stable tag, so it
passes the check while its readme.txt may already contain the next version's
changelog. Recommend a branch created from the release tag instead, and show
how to combine it with a branch restriction in the calling workflow.
SVN treats application/json as a binary MIME type, so blueprint changes
showed up as binary in svn diff and on plugins.trac.wordpress.org. The
property didn't help browsers either: the server sends .json files as
application/json with content-disposition: attachment, with or without it.

Blueprints now get no svn:mime-type, and the property is removed where
earlier runs set it.
The ::notice annotation is easy to miss, and on a live run the commit has
already happened by the time anyone reads it. Repeat it in the job summary,
like the trunk warning.

Document what the importer does with the release ZIP and what the release
cooldown is, based on the plugin directory's code.
A symlinked readme.txt was followed by the validation and the copy into
SVN, so it could publish any file on the runner that passes the Stable tag
check. The release workflow skips symlinks, so such a readme would never be
released either: reject it.

The ASSETS_DIR input check can't see symlinks. Resolve the directory after
checkout and fail if it, or one of its parents, points outside the
repository.
The workflow parsed readme headers three times with grep -m1, which reads
the first match anywhere in the file. A second Stable tag line, or one
outside the header, made it write the readme to a tag WordPress.org
doesn't serve, and the run still succeeded.

Use one shared parser that prints every header match before the first
== Section ==, and require exactly one Stable tag in Git and in SVN trunk.
Rather than copying WordPress.org's readme parser, which can change, any
ambiguous readme fails before anything is committed.

Multiple Requires values are joined into one line, so readme content
can't start a workflow command in the ::warning output.
WordPress.org can still be busy in "Committing transaction..." when svn's
HTTP timeout runs out, failing with E175012 while the commit goes through.
Unlike in the release workflow, where #300 raised the timeout because a
timeout leaves the release half done, a re-run here is always safe and
small plugin page commits rarely take that long. So keep the default
timeout and say that the commit may have gone through and a re-run shows
whether it did.
count_assets had its own copies of the icon, banner, and screenshot
patterns, although the job env comment says they're shared so they can't
drift apart. Match against ICON_RE, BANNER_RE, and SCREENSHOT_RE instead,
and count only default assets: every locale suffix starts with "-", so a
default name has exactly one "-" before the extension.

The result is the same as before for every combination of type, name,
suffix, and extension tested.
- Mark the SVN changes of a dry run as not committed.
- Link the changeset on plugins.trac.wordpress.org after a live commit.
- Say "already up to date" instead of "Updated" for readmes that don't
  change.
- Skip the readme.txt diff section when the diff is empty.
- Replace the ten implementation steps with four short ones; the details
  are in the sections below.
- Add a "Common tasks" table and an example that publishes the assets
  right after every release.
- Turn troubleshooting into a list of symptoms and fixes.
- Mention that GIT_REF also accepts pull request refs, so even a fork's
  pull request can be published.
- Explain how to export the assets into an existing directory.
@strangerkir

Copy link
Copy Markdown
Contributor Author

Thanks for the thorough review! Addressed in the latest commits:

  • Unreleased readme content (blocking): new "Choosing GIT_REF" section with a warning and a recipe for a branch created from the latest release. It also covers releases without a Git tag and branching from a later plugin page update, so that update isn't reverted. It includes the plugin-page/* caller example. Your if: and the deployment branch rule both only check the branch name, so the docs point to the dry run as the actual content check.
  • Blueprint MIME type: dropped, and removed where earlier runs set it. The server sends .json as application/json with content-disposition: attachment either way, so the property didn't help browsers.
  • Release Confirmation: the notice is repeated in the job summary, and the docs now describe the ZIP reset and the cooldown, based on the importer code.
  • Symlinks: readme.txt must not be a symlink, and ASSETS_DIR must resolve inside the repository.
  • Stable tag parsing: one shared parser, but instead of mirroring WordPress.org's parser, which can change, it fails closed. It requires exactly one Stable tag before the first section, in Git and in SVN trunk. Any Stable tag value we accept equals what WordPress.org would use. A duplicate Stable tag now fails instead of the last one winning.
  • Default asset patterns: count_assets now reuses the shared *_RE patterns instead of three more env vars. A default name is one without a locale suffix, i.e. with a single - before the extension. Behaviour is unchanged.
  • Job summary and docs readability: done as suggested. On top of that, the "Common tasks" table says to make each change on a branch created as described in "Choosing GIT_REF", and the adoption steps explain --force for exporting into an existing directory.
  • Concurrency: skipped. The race already ends safely with the "Concurrent SVN commit" error. Sharing the group with the release workflow has a catch: a group keeps only one pending run, so a plugin page run queued behind a waiting release would cancel the release.
  • Shared wporg-svn-commit action: agreed as a follow-up. Some projects that use these workflows allowlist every action they run, so a new action needs coordination first. Also, Pass SVN password via stdin in WordPress.org release workflow #301 already moved the release workflow to --password-from-stdin. The timeout difference is deliberate: Raise SVN commit timeout in WordPress.org release workflow #300 raised it for releases, where a timeout leaves the release half done. Here a re-run is safe, so this workflow keeps the default and explains E175012 instead.
  • DRY_RUN default: intentional. Previewing is the safer default for a workflow that changes a live page. Aligning the release workflow would be a breaking change, so I'd leave it for a separate discussion.
  • MultiSyde caller: good catch. That's outside this PR, so I'll open an issue in inpsyde/multisyde pointing to the new "Choosing GIT_REF" section.

@strangerkir
strangerkir requested a review from Biont November 23, 2026 18:33

@Biont Biont left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for thoroughly addressing all open points.

In general, I think this workflow really pushes the boundary of what one should do with reusable workflows alone. Many of the parts here are begging to be tackled with some outsourced shell/js/php code.

It's nothing we can really change now and it's not the fault of this PR or the followup after the review.

So I'll approve, but if we ever re-activate an actions repository, I'd wish we could use it to trim down the logic inside this workflow.

@Biont
Biont merged commit 5e70e1e into main Nov 23, 2026
7 checks passed
@Biont
Biont deleted the feature/PROD-196-wordpress-org-plugin-page branch November 23, 2026 20:31
lloc pushed a commit to inpsyde/multisyde that referenced this pull request Nov 30, 2026
inpsyde/reusable-workflows#296 is merged, so the plugin page workflow
now uses its merge commit on main instead of the PR head from
2026-10-30. The inputs and secrets are unchanged.

Refs SEH-29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants