Skip to content

Add actions that release a plugin to WordPress.org SVN from a ZIP - #5

Closed
dpanta94 wants to merge 9 commits into
mainfrom
dpanta94/feature-wporg-svn-release
Closed

dpanta94 wants to merge 9 commits into
mainfrom
dpanta94/feature-wporg-svn-release

Conversation

@dpanta94

@dpanta94 dpanta94 commented Oct 5, 2026

Copy link
Copy Markdown
Member

Ticket: none. This branch has no ticket ID; add one, or NO_TASK if that is intended.

Adds three composite actions that release a plugin to WordPress.org SVN from a built ZIP. tag prepares tags/<version> without moving the stable pointer, set-stable moves the Stable Tag, and update-trunk makes trunk a copy of the tag, so a protected environment can gate publishing after the tag is checked.

Worth reviewing

  • Tag first, on purpose, unlike WordPress.org's documented flow. Between tag's two commits the new tag is public but incomplete; a failure there is reported, never cleaned up or reused. See Recovery.
  • Nothing has written to wordpress.org. All writes were tested against local file:// repositories. Password auth and a second commit into a new tag are unverified there, so supervise the first real release.

Proof

  • 156 tests pass on macOS (bash 3.2) and Ubuntu 22.04/24.04; shellcheck and actionlint are clean.
  • Read-only live check: real image-widget, advanced-post-manager and The Events Calendar releases, mirrored locally, produced tags byte-identical to wordpress.org's.
  • The CI workflow first runs on this PR.

Covered by the new tests in tests/wporg-svn, which run the real scripts behind a guard that refuses any SVN write outside file://.

AI usage: Drafted with Claude Opus 5.5. I reviewed and tested every change — this is my work and I am accountable for it.

Tests for the wporg-svn actions run the real scripts against throwaway file:// repositories and a local HTTPS server. A guard sits first on PATH and refuses any svn, svnmucc or svnrdump write whose target isn't file://, so no test or QA run can change a production repository by mistake.
The helpers pin every read to one repository revision, never take a failed read to mean a path is absent, and pass the SVN password on stdin only. They check a release ZIP fully before extracting anything, read the Stable Tag and plugin version the way WordPress.org and WordPress do, and make a working copy match an artifact exactly.

A tag's properties are read with one streamed svnrdump dump instead of svn proplist -R, which asks for every path separately: 4 seconds instead of 685 on The Events Calendar's 6.18.0 tag.
tag prepares a release without moving the stable pointer. It copies the stable tag to tags/<version> on the server, checks out only that new tag, makes it match the ZIP byte for byte and commits the difference.

Between those two commits the new tag is public but incomplete. A failure there is reported loudly, and the tag is never cleaned up or reused automatically.
set-stable copies the new tag's readme.txt into trunk in one server-side commit, which moves the Stable Tag. It needs no checkout, fails rather than overwrite a competing change to trunk/readme.txt, and treats identical bytes as a verified no-op.
update-trunk replaces trunk with a copy of the released tag in one atomic commit, pinned to the revision it checked. Any change inside trunk since then makes the whole commit fail, and a trunk that already matches is a verified no-op.
Real repository hooks inject competing commits and rejected writes, including between tag's two commits. PATH wrappers simulate only what a file:// repository can't produce: lost responses and authentication, TLS and connection failures.

The tests also check that a cancelled run reports what it left behind, that a failed read is never taken for an absent path, and that the password and signed ZIP URL never leak.
The README covers run order, inputs and outputs, what each action checks, the ZIP limits, known limitations and how to recover from a failure between commits. A test keeps the README's example identical to examples/release.yml and each action.yml in step with its script.
The workflow lints the scripts and workflows, runs the suite on Ubuntu 22.04 and 24.04, and runs all three actions through uses: against a local fixture repository, with the write guard on PATH.
With WPORG_LIVE=1, the read helpers and parsers run against real WordPress.org plugins and release ZIPs, and real releases are mirrored into local repositories to confirm the actions produce byte-identical tags. Every write goes to a local file:// repository.
@coderabbitai

coderabbitai Bot commented Oct 5, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@dpanta94 dpanta94 closed this Oct 5, 2026
@dpanta94
dpanta94 deleted the dpanta94/feature-wporg-svn-release branch October 5, 2026 20:10
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.

1 participant