File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -228,7 +228,7 @@ jobs:
228228 version = re.escape(os.environ["RELEASE_VERSION"])
229229 changelog = Path("CHANGELOG.md").read_text(encoding="utf-8")
230230 match = re.search(
231- rf"^## {version} - . *$\n.*?(?=^## |\Z)",
231+ rf"^## {version} - [^\n] *$\n.*?(?=^## |\Z)",
232232 changelog,
233233 flags=re.MULTILINE | re.DOTALL,
234234 )
Original file line number Diff line number Diff line change 22
33## Unreleased
44
5+ - Stop automated GitHub Release notes at the next changelog heading so a
6+ release contains only its matching version section.
7+
58## 1.2.1 - 2026-07-21
69
710- Create or refresh the GitHub Release from the exact verified distributions
Original file line number Diff line number Diff line change @@ -711,6 +711,7 @@ def test_release_publish_is_tag_bound_and_reuses_one_verified_build() -> None:
711711 assert any ("download-artifact" in step .get ("uses" , "" ) for step in github_release ["steps" ])
712712 assert "CHANGELOG.md" in release_job_steps
713713 assert "release-notes.md" in release_job_steps
714+ assert ' - [^\\ n]*$\\ n.*?(?=^## |\\ Z)' in release_job_steps
714715 assert "gh release create" in release_job_steps
715716 assert "gh release edit" in release_job_steps
716717 assert "gh release upload" in release_job_steps
You can’t perform that action at this time.
0 commit comments