@@ -82,10 +82,13 @@ Add at the top:
8282- description (#PR-number)
8383```
8484
85- ### 5. Commit version bump
85+ ### 5. Regenerate lockfile and commit version bump
86+
87+ After updating ` pyproject.toml ` , regenerate the lockfile — CI runs ` uv sync --locked ` and will fail if it is stale:
8688
8789``` bash
88- git add pyproject.toml < package> /__init__.py CHANGELOG.md
90+ uv lock
91+ git add pyproject.toml < package> /__init__.py CHANGELOG.md uv.lock
8992git commit -m " chore(release): bump version to v{version} - {Adjective Animal}"
9093```
9194
@@ -120,13 +123,34 @@ gh release create "v{version}" \
120123**SHA**: \` ${SHA} \` "
121124```
122125
126+ ### 7. If a hotfix commit follows the release tag
127+
128+ If CI fails after the release (e.g. a stale lockfile) and a hotfix commit is pushed, reassign the tag and GitHub release to that commit:
129+
130+ ``` bash
131+ # Delete the old tag locally and on remote
132+ git tag -d " v{version}"
133+ git push origin " :refs/tags/v{version}"
134+
135+ # Recreate the tag on the hotfix commit
136+ git tag " v{version}" {hotfix-sha}
137+ git push origin " v{version}"
138+
139+ # Update the GitHub release to point to the new tag
140+ gh release edit " v{version}" --target {hotfix-sha}
141+ ```
142+
143+ The release notes and title do not need to change — only the target commit moves.
144+
123145## Quality Checklist
124146
125147- [ ] ` task test ` passes
126148- [ ] ` task lint ` passes
127149- [ ] ` task static-check ` passes
128150- [ ] ` pyproject.toml ` version updated
151+ - [ ] ` uv lock ` run after version bump — lockfile must be up to date
129152- [ ] ` <package>/__version__ ` matches ` pyproject.toml ` version
130153- [ ] CHANGELOG.md updated
131154- [ ] Release name not used before
132155- [ ] Release notes follow the template format
156+ - [ ] If a hotfix was pushed after the tag: tag reassigned to hotfix commit
0 commit comments