@@ -5,46 +5,70 @@ Prepares and publishes a new release for the bpmdetect project.
55## Role
66
77You manage the release process: update the changelog, determine the version bump, run pre-commit
8- checks, bump the version, and push.
8+ checks, bump the version, and push, and align GitHub release notes
9+ with the changelog.
910
1011## Workflow
1112
12131 . ** Review changes since last tag.** Run `git log $(git describe --tags --abbrev=0)..HEAD
1314--oneline` to see all commits since the last release.
1415
15- 2 . ** Update CHANGELOG.md.** Add entries under ` [Unreleased] ` if not already present. Use the
16+ 1 . ** Update CHANGELOG.md.** Add entries under ` [Unreleased] ` if not already present. Use the
1617 appropriate sections: Added, Changed, Fixed, Removed.
1718
18- 3 . ** Determine the version bump** based on Semantic Versioning:
19+ 1 . ** Determine the version bump** based on Semantic Versioning:
1920 - ** patch** : bug fixes, dependency updates, documentation changes.
2021 - ** minor** : new features, new commands, new public API additions.
2122 - ** major** : breaking changes to public API, removed commands/functions.
2223
23- 4 . ** Create a new version header** below ` [Unreleased] ` , moving the unreleased content under it.
24+ 1 . ** Create a new version header** below ` [Unreleased] ` , moving the unreleased content under it.
2425 Format: ` ## [X.Y.Z] - YYYY-MM-DD ` . Leave ` [Unreleased] ` empty above it.
2526
26- 5 . ** Launch agents in parallel** before bumping:
27+ 1 . ** Launch agents in parallel** before bumping:
2728 - ** copy-editor** - to fix prose in the changelog entries.
2829 - ** qa-fixer** - to format and fix any lint/spelling issues.
2930
30- 6 . ** Run ` pre-commit run -a ` ** to ensure all hooks pass. Fix any issues before proceeding.
31+ 1 . ** Run ` pre-commit run -a ` ** to ensure all hooks pass. Fix any issues before proceeding.
3132
32- 7 . ** Record the current HEAD** before bumping: ` git rev-parse HEAD ` (save this as ` PRE_BUMP_REF ` ).
33+ 1 . ** Record the current HEAD** before bumping: ` git rev-parse HEAD ` (save this as ` PRE_BUMP_REF ` ).
3334
34- 8 . ** Run ` cz bump --files-only --increment {MAJOR,MINOR,PATCH} ` ** with the appropriate increment.
35+ 1 . ** Run ` cz bump --files-only --increment {MAJOR,MINOR,PATCH} ` ** with the appropriate increment.
3536 This only updates version strings in files without committing or tagging. Never pass
3637 ` --changelog ` or ` -ch ` to ` cz bump ` . If ` cz bump ` fails for any reason:
3738 1 . ** Restore the repository** to the pre-bump state: ` git checkout -- . `
38- 2 . ** Stop work immediately and alert the user.** Do not attempt to work around the failure.
39-
40- 9 . ** Run ` uv sync ` ** to update ` uv.lock ` with the new version.
41-
42- 10 . ** Commit the version bump.** Stage all changed files and commit with
43- ` git commit -S -s -m 'bump: vOLD → vNEW' ` (replace OLD/NEW with actual versions).
44-
45- 11 . ** Create a signed tag.** Run ` git tag -s vNEW -m 'vNEW' ` (replace NEW with the new version).
46-
47- 12 . ** Push the commit and tag.** Run ` git push && git push --tags ` .
39+ 1 . ** Stop work immediately and alert the user.** Do not attempt to work around the failure.
40+
41+ 1 . ** Commit the version bump.** Stage all changed files and commit with
42+ ` git commit -S -s -m 'bump: vOLD → vNEW' ` (replace OLD/NEW with actual versions).
43+
44+ 1 . ** Create a signed tag.** Run ` git tag -s vNEW -m 'vNEW' ` (replace NEW with the new version).
45+
46+ 1 . ** Push the commit and tag.** Run ` git push && git push --tags ` .
47+
48+ 1 . ** Update GitHub release notes** using ` gh ` (authenticated for this repository). After the tag
49+ is on the remote, automation may create the GitHub ** Release** record later or as a ** draft** ;
50+ do not skip this step when a draft exists.
51+ - ** Wait for the release:** Poll until ` gh release view vNEW ` exits successfully, including
52+ when ` isDraft ` is true. Use a short sleep between attempts and a sensible overall timeout; if
53+ the release never appears, stop and report the failure.
54+ - ** Body from ` CHANGELOG.md ` :** Copy only the content for this version (from the first
55+ ` ### Added ` , ` ### Changed ` , ` ### Fixed ` , or ` ### Removed ` under that version through the line
56+ before the next ` ## [ ` version header). Do ** not** include the ` ## [X.Y.Z] - YYYY-MM-DD `
57+ heading line. For GitHub's layout, promote each of those subsection headings from ` ### ` to
58+ ` ## ` (` ### Added ` → ` ## Added ` , and the same pattern for Changed, Fixed, and Removed).
59+ - ** Wrapping within list items:** Undo changelog hard-wraps inside one bullet: when a list line
60+ ends with a single newline and the following line continues the same item (for example an
61+ indented continuation), join them with one space so ` - item with long sentence ` plus
62+ ` line 2 ` reads as ` - item with long sentence line 2 ` . Do ** not** join across a paragraph
63+ break: leave any run of ** two or more consecutive newlines** (` \n\n ` or more) unchanged.
64+ - ** Full Changelog line:** After the body, append ** one blank line** , then exactly:
65+ ` **Full Changelog**: https://github.com/Tatsh/bpmdetect/compare/vPREV...vNEW ` where ` vNEW ` is
66+ this release's tag. Set ` vPREV ` to the tag of the ** most recent other GitHub release** (for
67+ example from ` gh release list ` , ordered by recency, skipping ` vNEW ` ). If no earlier release
68+ exists on GitHub, fall back to the previous version in ` CHANGELOG.md ` immediately below this
69+ entry, or the git tag that precedes ` vNEW ` .
70+ - ** Apply:** Write the combined Markdown to a file (for example under ` .wiswa-ci/ ` ) and run
71+ ` gh release edit vNEW --notes-file <path> ` .
4872
4973## Rules
5074
0 commit comments