|
| 1 | +--- |
| 2 | +name: clawbox-release-publish |
| 3 | +description: Use when the user asks to prepare, cut, validate, tag, or publish a ClawBox desktop release. Covers the UTC date-based version flow (`npm run release:version`), release validation commands, release commit/tag creation, and pushing the matching `v` tag for the current package version that triggers GitHub Releases. Do not use for changing packaging or versioning logic itself; use the packaging skill for that. |
| 4 | +--- |
| 5 | + |
| 6 | +# ClawBox Release Publish |
| 7 | + |
| 8 | +Use this skill to run the current ClawBox release process end to end. |
| 9 | + |
| 10 | +## Read first |
| 11 | + |
| 12 | +- `docs/releasing.md` |
| 13 | +- `.github/release-notes-template.md` |
| 14 | +- `docs/releases/` |
| 15 | +- `package.json` |
| 16 | +- `scripts/release-version.mjs` |
| 17 | +- `scripts/sync-version.mjs` |
| 18 | +- `.github/workflows/release.yml` |
| 19 | +- `git status --short --branch` |
| 20 | + |
| 21 | +If the user also asks to create the commit or push the branch/tag, read `.agents/skills/clawbox-git-commit-push/SKILL.md`. |
| 22 | + |
| 23 | +## Workflow |
| 24 | + |
| 25 | +1. Inspect the worktree before starting. Stop if unrelated dirty changes would be mixed into the release. |
| 26 | +2. Fetch tags with `git fetch --tags` before generating a version. The UTC day sequence is based on local tags. |
| 27 | +3. Run `npm run release:version`. This updates `package.json`, `package-lock.json`, `src-tauri/tauri.conf.json`, and `src-tauri/Cargo.toml`. |
| 28 | +4. Read back the selected version with `node -p "require('./package.json').version"` and use that exact value for the release commit and tag. |
| 29 | +5. If the user wants curated release notes, copy `.github/release-notes-template.md` to `docs/releases/v<version>.md` and fill it in before the release commit. If that file is missing, GitHub falls back to auto-generated notes. |
| 30 | +6. Run the standard release validation set unless the user explicitly scopes it down: |
| 31 | + - `npm run scan:repo` |
| 32 | + - `npm run audit:licenses` |
| 33 | + - `npm run audit:deps` |
| 34 | + - `npm run build:frontend` |
| 35 | + - `npm run build:backend` |
| 36 | + - `cargo check --manifest-path src-tauri/Cargo.toml` |
| 37 | +7. If the user wants the release prepared but not published, stop after reporting the version, changed files, release notes status, and validation status. |
| 38 | +8. If the user wants the release published, create a focused commit for the release files, create tag `v<version>`, push the branch, then push the tag. |
| 39 | + |
| 40 | +## Expected commands |
| 41 | + |
| 42 | +Prepare the next release version: |
| 43 | + |
| 44 | +```bash |
| 45 | +git fetch --tags |
| 46 | +npm run release:version |
| 47 | +``` |
| 48 | + |
| 49 | +Validate the release: |
| 50 | + |
| 51 | +```bash |
| 52 | +npm run scan:repo |
| 53 | +npm run audit:licenses |
| 54 | +npm run audit:deps |
| 55 | +npm run build:frontend |
| 56 | +npm run build:backend |
| 57 | +cargo check --manifest-path src-tauri/Cargo.toml |
| 58 | +``` |
| 59 | + |
| 60 | +Publish after validation: |
| 61 | + |
| 62 | +```bash |
| 63 | +VERSION=$(node -p "require('./package.json').version") |
| 64 | +cp .github/release-notes-template.md "docs/releases/v${VERSION}.md" |
| 65 | + |
| 66 | +git add package.json package-lock.json src-tauri/tauri.conf.json src-tauri/Cargo.toml docs/releases/v${VERSION}.md |
| 67 | +git commit -m "release: v$VERSION" |
| 68 | +git tag "v$VERSION" |
| 69 | +git push origin HEAD |
| 70 | +git push origin "v$VERSION" |
| 71 | +``` |
| 72 | + |
| 73 | +## Guardrails |
| 74 | + |
| 75 | +- Do not hand-edit the version fields when the goal is to cut a release. Use `npm run release:version`. |
| 76 | +- Do not create or push a tag that differs from `v<package.json version>`. The release workflow rejects mismatches. |
| 77 | +- Do not silently skip `git fetch --tags`; without it, the same UTC day can generate the wrong `-N`. |
| 78 | +- Do not stage unrelated files, generated artifacts, or user work that is outside the release scope. |
| 79 | +- Do not assume release notes are mandatory; if `docs/releases/<tag>.md` is absent, the workflow falls back to GitHub-generated notes. |
| 80 | +- Do not claim Windows signing was performed unless `WIN_SIGN_THUMBPRINT` or equivalent signing prerequisites were actually available. |
| 81 | +- If validation is incomplete, say exactly which commands were skipped or failed. |
| 82 | + |
| 83 | +## Verification |
| 84 | + |
| 85 | +- Confirm `package.json`, `package-lock.json`, `src-tauri/tauri.conf.json`, and `src-tauri/Cargo.toml` all reflect the same version after `npm run release:version`. |
| 86 | +- Run `npm run sync-version` after version generation only when you need to verify the sync chain; it should not create additional diffs. |
| 87 | +- After commit/tag creation, report the version, commit hash, branch, and pushed tag. |
0 commit comments