Refactor GitHub Actions workflow and add scripts for versioning and release notes extraction

This commit is contained in:
Ujwal223 committed 2026-05-25 22:53:53 +05:45
1 parent 29fe5a8d73
commit 30252ac721
3 files changed
+25 -54

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
import os, re
from pathlib import Path
version = os.environ["VERSION"]
text = Path("CHANGELOG.md").read_text(encoding="utf-8")
pattern = rf"(?ms)^##\s+FocusGram\s+{re.escape(version)}\s*$.*?(?=^##\s+|\Z)"
m = re.search(pattern, text)
if not m:
raise SystemExit(f"Could not find changelog section for version {version}")
Path("release_notes.md").write_text(m.group(0).strip() + "\n", encoding="utf-8")