Skip to content

Commit

Permalink
Allow empty change log
Browse files Browse the repository at this point in the history
  • Loading branch information
CyrilleB79 committed Sep 24, 2024
1 parent a8ea200 commit 7d223d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/upload-on-tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ jobs:
print(f'===> Version:{version}')
pattern = rf'## Change log.*### Version {version}\s*(.*?)\s*(\n(### Version)|(\[\d+\]:)|$)'
fileContent = open('readme.md', 'r', encoding='utf8').read()
changeLog = re.search(pattern, fileContent, re.DOTALL).group(1) + '\n'
match = re.search(pattern, fileContent, re.DOTALL)
changeLog = match.group(1) if match else ""
changeLog += '\n'
print(f'===> ChangeLog:\n<<<{changeLog}>>>\n')
open('changelog.md', 'w', encoding='utf-8').write(changeLog)
shell: python
Expand Down

0 comments on commit 7d223d8

Please sign in to comment.