File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -328,17 +328,16 @@ jobs:
328328 ")
329329
330330 # Extract CHANGELOG entries for this version
331- CHANGELOG_ENTRIES=$(node -e "
332- const fs = require('fs');
333- const content = fs.readFileSync('CHANGELOG.md', 'utf8');
334- const versionPattern = new RegExp(\`## v\${{ github.event.inputs.version }}.*?\\n(.*?)(?=\\n## |$)\`, 'gs');
335- const versionMatch = content.match(versionPattern);
336- if (versionMatch && versionMatch[0]) {
337- const entries = versionMatch[0].replace(/^## v\${{ github.event.inputs.version }}.*?\\n/, '').trim();
338- if (entries) {
339- console.log(entries);
340- }
341- }
331+ CHANGELOG_ENTRIES=$(python3 -c "
332+ import re
333+ with open('CHANGELOG.md', 'r') as f:
334+ content = f.read()
335+ version_pattern = r'## v${{ github.event.inputs.version }}.*?\n(.*?)(?=\n## |\Z)'
336+ version_match = re.search(version_pattern, content, re.DOTALL)
337+ if version_match:
338+ entries = version_match.group(1).strip()
339+ if entries:
340+ print(entries)
342341 ")
343342
344343 # Create release notes
You can’t perform that action at this time.
0 commit comments