---
name: release
description: Prepares a Waymark plugin release. Use when bumping the version number, writing a changelog entry, and running the Grunt build before deploying to WordPress.org. Triggers on "release", "bump version", "new version", "changelog", or "ship".
---

# Waymark Release Skill

Handles the full pre-deploy release workflow: version bump across all required files, changelog entry, and Grunt build.

## Files that require manual version updates

Since `inc/Waymark_Config.php` reads the version dynamically from `Waymark.php`, only these three files need editing:

| File             | What to change                        |
| ---------------- | ------------------------------------- |
| `Waymark.php:7`  | `Version: X.Y.Z` in the plugin header |
| `package.json:3` | `"version": "X.Y.Z"`                  |
| `readme.txt:7`   | `Stable tag: X.Y.Z`                   |

`readme.md` and `languages/waymark.pot` are auto-generated by Grunt — do not edit them manually.

## Changelog format (`readme.txt`)

Insert a new section immediately after the `== Changelog ==` heading (line 188):

```
= X.Y.Z =

* Change one.
* Change two.

```

Keep entries concise; use WordPress.org support or GitHub issue links where relevant (see existing entries for style).

## Grunt tasks to run after file edits

Run these from the project root (where `package.json` lives):

```bash
grunt build_wp_css && grunt build_wp_js && grunt makepot && grunt build_wp_md
```

- `build_wp_css` — compiles LESS → CSS → minified
- `build_wp_js` — concatenates and minifies JS
- `makepot` — regenerates `languages/waymark.pot` with the new version header
- `build_wp_md` — converts `readme.txt` → `readme.md`

Do **not** run `grunt` (default) — it ends with a blocking `watch` task.

## Release workflow

1. **Collect inputs** — ask Joe for the new version number (e.g. `1.5.17`) and the changelog notes (bullet points describing what changed).
2. **Edit `Waymark.php:7`** — update `Version:` line.
3. **Edit `package.json:3`** — update `"version"`.
4. **Edit `readme.txt:7`** — update `Stable tag:`.
5. **Edit `readme.txt`** — prepend the new changelog section after `== Changelog ==`.
6. **Run Grunt** — execute the four tasks above; report any errors.
7. **Summarise** — list every file changed so Joe can review in Git before committing.

## Deploy trigger

Pushing to `master` with a changed `Version:` in `Waymark.php` triggers `.github/workflows/deploy.yml`, which:

- Deploys to WordPress.org SVN
- Creates a GitHub Release tagged `vX.Y.Z`

No manual deploy step is needed beyond the git push.
