diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e75211..3db6f02 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,7 +99,6 @@ jobs: git tag "$TAG_NAME" git push origin "$TAG_NAME" - name: Eextract log - id: extract_log run: python extract_log.py ${{ steps.create_tag.outputs.TAG_NAME }} - name: Download Windows artifact uses: actions/download-artifact@v4 @@ -117,7 +116,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{ steps.create_tag.outputs.TAG_NAME }} - body: ${{ steps.extract_log.outputs.result }} + body_path: CHANGELOG_${{ steps.create_tag.outputs.TAG_NAME }}.md draft: false prerelease: false files: | diff --git a/extract_log.py b/extract_log.py index ef8c5bf..78a4b91 100644 --- a/extract_log.py +++ b/extract_log.py @@ -24,7 +24,12 @@ def extract_log(version): changelog_lines.pop() output = "".join(changelog_lines).strip() - print(output) + + output_file = f"CHANGELOG_{version}.md" + with open(output_file, "w", encoding="utf-8") as file: + file.write(output) + + print(f"Changelog for {version} saved to {output_file}") if __name__ == "__main__": if len(sys.argv) != 2: @@ -32,4 +37,4 @@ if __name__ == "__main__": sys.exit(1) version = sys.argv[1] - extract_log(version) + extract_log(version) \ No newline at end of file