From 3694990719b9620078d469fde744f1c5385bdd25 Mon Sep 17 00:00:00 2001 From: Netanel Baba <50736016+Ntnelbaba@users.noreply.github.com> Date: Tue, 3 Nov 2026 13:02:27 +0200 Subject: [PATCH] Internal: Document Hello Theme release workflow (#706) * Internal: Document Hello Theme release workflow Add docs/release.md and hello-theme-release agent skill. Expand DEVELOPERS.md with release-branch bump and Deploy steps; reference e86d30a / #695 as the version bump template. Co-authored-by: Netanel Baba * Internal: Address release docs review on #706 Default main bump with cp label; dedupe file list into docs/release.md; fix Deploy workflow order and DEPLOYMENT_PERMITTED_USERS; drop broken update-version npm script. Co-authored-by: Netanel Baba --------- Co-authored-by: Cursor Agent Co-authored-by: Netanel Baba --- .cursor/skills/hello-theme-release/SKILL.md | 61 +++++++++++++++++++ DEVELOPERS.md | 7 +-- docs/release.md | 65 +++++++++++++++++++++ package.json | 1 - 4 files changed, 129 insertions(+), 5 deletions(-) create mode 100644 .cursor/skills/hello-theme-release/SKILL.md create mode 100644 docs/release.md diff --git a/.cursor/skills/hello-theme-release/SKILL.md b/.cursor/skills/hello-theme-release/SKILL.md new file mode 100644 index 00000000..6686d8b3 --- /dev/null +++ b/.cursor/skills/hello-theme-release/SKILL.md @@ -0,0 +1,61 @@ +--- +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, or deploy to WordPress.org. +- After fixes are merged and a GA zip is needed from a release line. + +## Reference + +- Main bump + `cp_3.5`: [#693](https://github.com/elementor/hello-theme/pull/693) → [#695](https://github.com/elementor/hello-theme/pull/695) +- Commit shape on release branch: `e86d30a7d64b2ab59373422a14933bba3621ee04` + +Human-readable doc (files to touch, changelog, Deploy): `docs/release.md`. + +## Workflow + +### 1. Confirm what ships + +```bash +git fetch origin main +git log origin/main --oneline -20 +``` + +List merges since the last changelog header in `readme.txt`. Those belong in the new changelog bullets. Fix PRs must not bump version. + +### 2. Version bump PR on `main` (default) + +```bash +git checkout -b feat/-changelog origin/main +``` + +Update the five files listed in [docs/release.md](../../docs/release.md#files-to-update) in one commit. + +- Commit: `Internal: X.Y.Z changelog` +- PR **base `main`**, title `Internal: X.Y.Z changelog` +- Add label `cp_` (for example `cp_3.5`) so `.github/workflows/cherry-pick-pr.yml` opens the release-branch PR on merge + +Test plan: version `X.Y.Z` in all five files; changelog block `= X.Y.Z - DATE =`; release branch will get the cherry-pick PR automatically. + +Do **not** merge or run Deploy unless the user asks. + +### 3. Release branch + +After the main bump merges with `cp_`, review and merge the auto-opened cherry-pick PR to the release branch. Resolve conflicts only in version/changelog if needed. + +**Exception:** bump PR opened directly on the release branch (rare; for example CP changelog to `main` only). See docs/release.md. + +### 4. Deploy (permitted actor) + +After merge to the release branch: Actions → **Deploy** on that branch, version = `package.json`. Steps and permissions: [docs/release.md](../../docs/release.md#deploy-to-wordpressorg). Never re-publish the same SVN version. + +## Do not + +- Edit version/changelog in individual fix or cherry-pick PRs when a dedicated bump PR is planned. +- Force-push release branches. +- Run Deploy from `main`. diff --git a/DEVELOPERS.md b/DEVELOPERS.md index fc2d025f..522dfeab 100644 --- a/DEVELOPERS.md +++ b/DEVELOPERS.md @@ -170,7 +170,6 @@ 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 workflow: files to sync, changelog format, default **main** bump with `cp_`, and the **Deploy** workflow. + +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..8e0a4438 --- /dev/null +++ b/docs/release.md @@ -0,0 +1,65 @@ +# 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 fixes into `main` (and into the release branch via `cp_` cherry-picks when needed). +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: [#693](https://github.com/elementor/hello-theme/pull/693) on `main` → `cp_3.5` → [#695](https://github.com/elementor/hello-theme/pull/695) on `3.5` ([e86d30a](https://github.com/elementor/hello-theme/commit/e86d30a7d64b2ab59373422a14933bba3621ee04)). + +**Default:** open the bump PR against **`main`**, then add label `cp_3.5` (or `cp_`). After merge, the cherry-pick workflow opens the matching PR on the release branch. + +**Exception:** a bump PR opened directly on the release line (for example backporting a changelog already merged on `3.5` to `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 since the previous GA version. + +### Branch and title + +- **Default base:** `main`. Branch name pattern: `feat/-changelog`. +- **Release-line base:** the `MAJOR.MINOR` branch when using the exception above. +- Commit/PR title pattern: `Internal: X.Y.Z changelog` (optional Jira ref). +- On a **main** bump PR, add `cp_` (for example `cp_3.5`) before merge so cherry-pick automation opens the release-branch PR. + +## 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 **Deploy** workflow (`.github/workflows/deploy.yml`) runs in order: + +1. **validate** — actor allowed via repo variable `DEPLOYMENT_PERMITTED_USERS`; branch name pattern; workflow `version` input matches `package.json`. +2. **build** — reusable **Build** workflow produces the theme zip artifact. +3. **deploy** — download artifact; **Validate changelog** (`readme.txt` contains `= {version} -`); publish to [themes.svn.wordpress.org/hello-elementor](https://themes.svn.wordpress.org/hello-elementor/); Slack notify `#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. diff --git a/package.json b/package.json index 23535f36..f7984f40 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,6 @@ "test:setup:playwright": "wp-env run cli bash hello-elementor-config/setup.sh && wp-env run tests-cli bash hello-elementor-config/setup.sh", "test:setup:chromium": "npx playwright install chromium", "zip": "npm run clean:build && npm run build:prod && rsync -av --exclude-from=.buildignore . $npm_package_name && zip -r $npm_package_name.$npm_package_version.zip $npm_package_name/*", - "update-version": "node .github/scripts/update-version-in-files.js", "wp-env:start": "wp-env start", "wp-env:stop": "wp-env stop" },