Port WP Job Manager release tooling to WP Super Cache#1069
Open
donnchawp wants to merge 3 commits into
Open
Conversation
Adopts the two-phase, CI-deployed release model: `make release VERSION=x.y.z` opens a PR with an editable changelog; merging it runs a GitHub Action that writes the changelog into readme.txt, tags, builds the zip, and deploys to WordPress.org SVN. - Add config-driven prepare-release.mjs / create-release.mjs (read release.config.json; shell out to `make build` / `make i18n`). - release.config.json: slug wp-super-cache, main file wp-cache.php, no version constant (WPSC_VERSION_ID is an unrelated internal version), no package.json bump (its version is a Jetpack-monorepo leftover). - create-release.yml deploys on merge of release/* PRs via the 10up action, using WORDPRESSORG_SVN_* repo secrets. Uses npm install (lockfile is gitignored). - Make build-plugin.sh non-interactive/CI-safe; add `release` and `i18n` (no-op) Make targets; retire the manual pre-build/publish scripts. - readme.txt is the single changelog; drop the "See previous releases" footer. First live release is deliberate/supervised (not triggered by this PR, whose branch is not release/*). Claude-Session: https://claude.ai/code/session_01CZWPVHhcZmaVPRC1ARiVyf
Release confirmations are enabled on wp.org, so a merged release is pushed to SVN but held pending email confirmation rather than published immediately. Reword the post-deploy comment from "deployed" to "pushed … confirm to publish" so the PR doesn't imply the release is already live. Claude-Session: https://claude.ai/code/session_01CZWPVHhcZmaVPRC1ARiVyf
Apply the guarded shared release script (see RELEASE_TOOLING_CONCERNS.md): - getReleaseNotes() null-checks the `### Release Notes` / `---` fences and throws an explicit error instead of a cryptic null dereference (Concern 3). - Every mutating step is idempotent and safe to re-run (Concern 2): skip the changelog if the version entry exists; commit only if staged; tag only if absent on the remote; create the GitHub release only if absent; short-circuit to exit 0 (emitting the version) if the tag + release already exist. - Changelog writer is now section-bounded (stops at the next `== ... ==`), and the build dir is config-driven (buildDir, default "build"). Keeps this repo's create-release.mjs identical to the rest of the family. Claude-Session: https://claude.ai/code/session_01CZWPVHhcZmaVPRC1ARiVyf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adopts WP Job Manager's two-phase, CI-deployed release model so WP Super Cache releases the same way:
make release VERSION=x.y.z(local) — creates arelease/wp-super-cache-x.y.zbranch, bumpsVersion:/Stable tag:, assembles the changelog from the GitHub milestonex.y.z(each merged PR's### Release Notessection, falling back to the PR title), and opens a PR whose body holds the changelog editable between the two---lines..github/workflows/create-release.ymlrunsscripts/create-release.mjs, which writes the edited notes intoreadme.txt's== Changelog ==, tags, builds the zip, creates the GitHub release, and deploys to WordPress.org SVN via the 10up action.This retires the manual
pre-build→build→publishpipeline.Config-driven, per the shared design
The orchestrator scripts are intended to stay identical across plugins; per-repo specifics live in
release.config.json:versionConstant: null— WPSC definesWPSC_VERSION_ID(an internal cache/config version, decoupled from the plugin version), so there is no release-version constant to bump.bumpPackageJson: false—package.json's4.0.0-alpha/@automattic/jetpack-super-cacheis a Jetpack-monorepo leftover unrelated to the plugin version.make build(emitsbuild/wp-super-cache.zip) andmake i18n(a no-op — WPSC translations come from translate.wordpress.org).Notable changes
scripts/build-plugin.shmade non-interactive / CI-safe (dropped the branch/clean-tree guards and the "have you merged?" prompt that would hang the runner).npm install, notnpm ci—package-lock.jsonis gitignored in this repo.readme.txtis the single changelog; removed the "See previous releases on GitHub" footer.Before the first release
WORDPRESSORG_SVN_USERNAME/WORDPRESSORG_SVN_PASSWORD.x.y.zand assign the release's PRs to it.Merging this PR does not trigger a release — the workflow only fires for
release/*branches.Verification
node --checkon both scripts;prepare-release.mjsexits correctly with no VERSION.make buildproduces the zip and correctly excludesrelease.config.json,scripts/,.github/.updateChangelog()dry-run againstreadme.txt: 5 trimmed### versionentries, no leftover divider, trailing newline preserved.https://claude.ai/code/session_01CZWPVHhcZmaVPRC1ARiVyf