Skip to content

Commit 7d223d8

Browse files
committed
Allow empty change log
1 parent a8ea200 commit 7d223d8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/upload-on-tag.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ jobs:
3838
print(f'===> Version:{version}')
3939
pattern = rf'## Change log.*### Version {version}\s*(.*?)\s*(\n(### Version)|(\[\d+\]:)|$)'
4040
fileContent = open('readme.md', 'r', encoding='utf8').read()
41-
changeLog = re.search(pattern, fileContent, re.DOTALL).group(1) + '\n'
41+
match = re.search(pattern, fileContent, re.DOTALL)
42+
changeLog = match.group(1) if match else ""
43+
changeLog += '\n'
4244
print(f'===> ChangeLog:\n<<<{changeLog}>>>\n')
4345
open('changelog.md', 'w', encoding='utf-8').write(changeLog)
4446
shell: python

0 commit comments

Comments
 (0)