--- name: release description: Prepare, validate, and publish a Pake release. Not for version bumps without release intent. version: 1.7.0 allowed-tools: - Bash - Read - Grep - Glob disable-model-invocation: true --- # Release Skill Use this skill when preparing or executing a Pake release. Shared facts live in `AGENTS.md` and are not repeated here: the four version files and tag format (Version Management), CI jobs, Trusted Publishing, surface separation, and the contributors bot (Release Workflow), and issue closeout (Issue Closeout After a Fix). ## Pre-Release 1. [ ] Before changing files or running any formatter/build, freeze the full baseline with `git status --short --branch -uall`, `git diff`, and `git diff --cached`. If the checkout contains unrelated or ambiguously owned changes, prepare the release in an isolated worktree. 2. [ ] Confirm the new version (`jq .version package.json`; previous tag per AGENTS.md Version Management) and that `npm view pake-cli@X.Y.Z version` returns 404. 3. [ ] Update all four version files. 4. [ ] `pnpm run format`, then `pnpm test`. If `pnpm test` fails at the suite's `pnpm install pake-cli@latest` (run in `/tmp`) against a mirror, re-run once; two consecutive failures are real. 5. [ ] `pnpm run cli:build`, then `pnpm run release:check` (version sync, format, vitest, package contents, npm dry-run). 6. [ ] Re-read `git status --short --branch -uall`, `git diff`, and `git diff --cached`. Restore only build-churn paths that were clean in the baseline and provably generated by this run; otherwise repeat in an isolated worktree. 7. [ ] Commit `chore: bump version to VX.Y.Z` with the rebuilt `dist/cli.js` staged via `git add -f dist/cli.js`. ## Tag And Verify ```bash git tag -a VX.Y.Z -m "Release VX.Y.Z" git push origin VX.Y.Z ``` If the bump push is rejected, rebase onto the contributors bot commit as AGENTS.md describes, push, then tag the last real commit. Never force-push. 1. [ ] `gh run list --workflow=release.yml`, then poll `gh run view --json status,conclusion`. 2. [ ] `gh release view VX.Y.Z --json tagName,url,assets`, then fill the title and body per **GitHub Release Notes** below; CI leaves a bare placeholder. 3. [ ] `gh run list --workflow=npm-publish.yml`, then `npm view pake-cli@X.Y.Z version gitHead dist.tarball --json` and `npm view pake-cli version` for `latest`. 4. [ ] Record `gh run list --workflow=quality-and-test.yml --limit 3` separately. 5. [ ] Confirm the release workflow's `Move Major Action Tag` job moved the major tag: `git ls-remote origin refs/tags/v3` must equal the `VX.Y.Z` commit (`git rev-parse VX.Y.Z^{commit}`), since the Action docs pin `tw93/Pake@v3`. The job runs only after `Build CLI` succeeds and skips when the tag is not the newest `VX.*` release, so a re-pushed older tag never moves it back. Never force-push it by hand unless that job failed. 6. [ ] Add the six positive reactions (`+1`, `laugh`, `heart`, `hooray`, `rocket`, `eyes`) to `repos/tw93/Pake/releases//reactions` via `gh api` and read them back. Never `-1` or `confused`. ## npm-Only Hotfix (no tag) For CLI or Rust-template fixes that must reach npm without an app release. The version number is still consumed, so the next `V*` tag skips over it. 1. [ ] Bump all four version files, `pnpm run cli:build`, stage the version files and `git add -f dist/cli.js`. 2. [ ] `pnpm run release:check` (already includes vitest). For a Rust-template fix, also run the narrow current-platform Rust check. 3. [ ] Commit `chore: bump version to VX.Y.Z`, push `main`, record `` with `git rev-parse HEAD`. 4. [ ] Wait for `gh run list --workflow=quality-and-test.yml --commit --limit 3 --json databaseId,headSha,status,conclusion` to be `completed` / `success`; for Rust-template changes also `Full Tauri Build (windows-latest)`. 5. [ ] `gh workflow run npm-publish.yml --ref main -f expected_sha= -f quality_run_id=`. If `main` moved, wait for the new head's own Quality run. 6. [ ] Poll `gh run view --json headSha,status,conclusion`; `headSha` and the npm `gitHead` must both equal ``. 7. [ ] Issue closeout per AGENTS.md; for a Rust-template fix, tell users to rebuild their app after upgrading. Skip for a hotfix: no `V*` tag, no GitHub Release or notes, no reactions, no Docker. A successful publish followed by a verification timeout does not authorize republishing: npm scans new packages for 5 to 15+ minutes. Re-read the registry until the version appears. Local fallback, only when the trusted path is blocked: `npm exec --yes --package=pnpm@10.26.2 -- npm publish --registry=https://registry.npmjs.org`. ## GitHub Release Notes Before writing notes, `gh release view ` and treat its structure as the hard template, codename included. Title: `V `, one English codename word, optionally one emoji (`V3.11.8 Polish`, `V3.11.0 Evolve 👻`); patch releases get a codename too. Source items from `git log VPREV..VX.Y.Z`, user-facing only. ```markdown
Pake Logo

Pake VX.Y.Z

Turn any webpage into a desktop app with one command.

### Changelog 1. ... ### 更新日志 1. ... Special thanks to @user for the reports and PRs behind this release. If Pake helps you, please consider giving it a star and recommending it to your friends. > https://github.com/tw93/Pake ``` Apply with `gh release edit VX.Y.Z --title "VX.Y.Z Codename" --notes-file notes.md`.