File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed
Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -64,18 +64,12 @@ jobs:
6464 content = f.read()
6565
6666 # Look for version section (matches [X.X.X] or [Unreleased])
67- version_pattern = rf'\[{re.escape(version)}\].*?(?=\n## |\n\[|$ )'
68- match = re.search(version_pattern , content, re.DOTALL | re.MULTILINE )
67+ pattern = rf'## \[{re.escape(version)}\][^\n]*\n( .*?) (?=\n## |\Z )'
68+ match = re.search(pattern , content, re.DOTALL)
6969
7070 if match:
71- # Extract the content and clean it up
72- section = match.group(0)
73- # Remove the version header line
74- lines = section.split('\n')[1:]
75- # Remove empty lines at the start
76- while lines and not lines[0].strip():
77- lines.pop(0)
78- changelog_content = '\n'.join(lines).strip()
71+ # Extract the content directly from capture group
72+ changelog_content = match.group(1).strip()
7973
8074 if changelog_content:
8175 print(changelog_content)
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515
1616### Changed
1717- 🧹 ** Code Quality** : Improved code readability and maintainability in release management scripts
18+
1819## [ 0.3.1] - 2025-01-02
1920
2021### Added
You can’t perform that action at this time.
0 commit comments