diff --git a/.cursor/skills/hello-theme-release/SKILL.md b/.cursor/skills/hello-theme-release/SKILL.md new file mode 100644 index 00000000..3deb098e --- /dev/null +++ b/.cursor/skills/hello-theme-release/SKILL.md @@ -0,0 +1,73 @@ +--- +name: hello-theme-release +description: Cut a Hello Elementor patch release on a MAJOR.MINOR branch (version bump PR and WordPress.org Deploy). Use when releasing 3.5.x, bumping readme changelog, or running the Deploy workflow. +--- + +# Hello Elementor release + +## When to use + +- User asks to release Hello Theme, bump `readme.txt` / version on `3.5` (or another release line), or deploy to WordPress.org. +- After cherry-picks are merged into a release branch and a GA zip is needed. + +## Reference + +Follow the same file set and diff shape as: + +- Commit: `e86d30a7d64b2ab59373422a14933bba3621ee04` +- Release branch PR: [#695](https://github.com/elementor/hello-theme/pull/695) +- Main PR (optional `cp_`): [#693](https://github.com/elementor/hello-theme/pull/693) + +Human-readable doc: `docs/release.md` in the repo root. + +## Workflow + +### 1. Confirm release branch state + +```bash +git fetch origin main +git log origin/ --oneline -20 +``` + +List merges since the last changelog version header in `origin/:readme.txt`. Those commits belong in the new changelog bullets. + +Ensure individual fix PRs did not bump version (happy path: only the dedicated changelog PR touches version files). + +### 2. Version bump PR on the release branch + +```bash +git checkout -b feat/-changelog-45bb origin/ +``` + +Update in one commit: + +- `functions.php` — `HELLO_ELEMENTOR_VERSION` +- `style.css` — `Version`, `Stable tag`; sync `Tested up to` with `readme.txt` if needed +- `readme.txt` — `Stable tag`, `Version`, new top changelog section `= X.Y.Z - YYYY-MM-DD =` +- `package.json` and `package-lock.json` (both version fields in lockfile) + +Commit message: `Internal: X.Y.Z changelog` with body listing included PRs. + +Open PR **base ``**, not `main`. Title example: `Internal: 3.5.2 changelog`. + +Test plan checklist: + +- Version is `X.Y.Z` in all five files above +- Changelog block exists for the release date +- Deploy workflow will find `= X.Y.Z -` in `readme.txt` + +Do **not** merge or run Deploy unless the user asks. + +### 3. Optional main-line bump + +For a release on `main` first, merge version PR there, add label `cp_3.5` (or target branch name) so `.github/workflows/cherry-pick-pr.yml` opens the release-branch PR; resolve conflicts only in version/changelog if needed. + +### 4. Deploy (human / permitted actor) + +After merge to release branch: Actions → **Deploy** → branch = release line, version = `package.json` version. Never re-publish the same version to SVN. + +## Do not + +- Edit version/changelog in cherry-pick fix PRs when the release process owns the bump. +- Force-push release branches. +- Run Deploy from `main`. diff --git a/DEVELOPERS.md b/DEVELOPERS.md index fc2d025f..2f2a8d8f 100644 --- a/DEVELOPERS.md +++ b/DEVELOPERS.md @@ -170,7 +170,12 @@ entry points and output (`./assets`) are defined in `webpack.config.js`. ## Releases & versioning -The version appears in four places that must stay in sync: `style.css`, `readme.txt` -(`Stable tag` + `Version`), `functions.php` (`HELLO_ELEMENTOR_VERSION`), and -`package.json`. Use `npm run update-version` to sync them. `readme.txt` changelog format: -`= X.Y.Z - YYYY-MM-DD =` with `New` / `Tweak` / `Fix` / `Internal` bullet lines. +See **[docs/release.md](./docs/release.md)** for the full WordPress.org release workflow (version bump PR, Deploy workflow, reference commit `e86d30a` / #695). + +The version appears in five places that must stay in sync: `style.css`, `readme.txt` +(`Stable tag` + `Version`), `functions.php` (`HELLO_ELEMENTOR_VERSION`), `package.json`, +and `package-lock.json` (root and `packages[""].version`). Update them together in a +dedicated **Internal: X.Y.Z changelog** PR on the release branch after fixes are merged. + +`readme.txt` changelog format: `= X.Y.Z - YYYY-MM-DD =` with `New` / `Tweak` / `Fix` / +`Internal` bullet lines. Agents should follow `.cursor/skills/hello-theme-release/SKILL.md`. diff --git a/docs/release.md b/docs/release.md new file mode 100644 index 00000000..45347d8c --- /dev/null +++ b/docs/release.md @@ -0,0 +1,56 @@ +# Hello Elementor release (WordPress.org) + +Hello Theme ships from **release-line branches** named `MAJOR.MINOR` (for example `3.5`). `main` is day-to-day development; production WordPress.org releases are cut from the matching release branch. + +## Before you bump + +1. Merge all fixes into the release branch (cherry-pick PRs, or automatic picks via `cp_` labels on merges to `main`). +2. Do **not** change version or `readme.txt` changelog in individual fix PRs; batch them in one version PR (see reference below). + +## Version bump PR (patch release) + +Reference implementation: [e86d30a](https://github.com/elementor/hello-theme/commit/e86d30a7d64b2ab59373422a14933bba3621ee04) / [#695](https://github.com/elementor/hello-theme/pull/695) (3.5.1 on `3.5`), originally [#693](https://github.com/elementor/hello-theme/pull/693) on `main`. + +### Files to update + +| File | What to change | +|------|----------------| +| `functions.php` | `HELLO_ELEMENTOR_VERSION` | +| `style.css` | `Version`, `Stable tag`; align `Tested up to` with `readme.txt` when needed | +| `readme.txt` | `Stable tag`, `Version`, new `== Changelog ==` block | +| `package.json` | `"version"` | +| `package-lock.json` | Root `"version"` and `packages[""].version` (both must match) | + +### Changelog block + +Add at the top of `== Changelog ==` in `readme.txt`: + +```text += X.Y.Z - YYYY-MM-DD = +* Fix: … +* Tweak: … +``` + +Use categories `New`, `Tweak`, `Fix`, or `Internal`. Summarize every user-facing merge on the release branch since the previous GA version. + +### Branch and title + +- Base branch: the release line (for example `3.5`). +- Commit/PR title pattern: `Internal: X.Y.Z changelog` (optional Jira ref). +- Label `cp_3.5` on the **main** version PR if you also want the cherry-pick workflow to open the release-branch PR automatically; otherwise open the release-branch bump PR directly on `3.5`. + +## Deploy to WordPress.org + +After the version PR is merged into the release branch: + +1. GitHub **Actions** → workflow **Deploy** → **Run workflow**. +2. Select the release branch (must match `^[0-9]+\.[0-9]+`, e.g. `3.5`). +3. Enter the **version** input exactly as in `package.json`. + +The workflow validates the actor against `DEPLOYMENT_PERMITTED`, checks that `readme.txt` contains `= {version} -`, builds the theme zip, publishes to [themes.svn.wordpress.org/hello-elementor](https://themes.svn.wordpress.org/hello-elementor/), and notifies `#tmz-hello-delivery`. + +WordPress.org theme versions are **immutable**. To ship further changes, increment patch (or minor/major) and run Deploy again. + +## Agents + +See `.cursor/skills/hello-theme-release/SKILL.md` for the step-by-step agent workflow.