Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .cursor/skills/hello-theme-release/SKILL.md
Original file line number Diff line number Diff line change
@@ -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 <release-branch>
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/<version>-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_<release-line>` (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_<line>`, 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`.
7 changes: 3 additions & 4 deletions DEVELOPERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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_<line>`, and the **Deploy** workflow.

Agents should follow `.cursor/skills/hello-theme-release/SKILL.md`.
65 changes: 65 additions & 0 deletions docs/release.md
Original file line number Diff line number Diff line change
@@ -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_<line>` 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_<release-line>`). 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/<version>-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_<release-line>` (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.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
Loading