Skip to content

Commit

Permalink
Merge pull request #143 from jhernand/add_changes_to_releases
Browse files Browse the repository at this point in the history
Add changes to releases
  • Loading branch information
jhernand authored Dec 3, 2021
2 parents c837f98 + 2b38c80 commit 868dfb2
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/publish-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,19 @@ jobs:
args = ["sha256sum", asset]
subprocess.run(check=True, cwd=assets, stdout=stream, args=args)
# Get the list of changes:
body = ""
with open("CHANGES.md", "r") as stream:
while True:
line = stream.readline()
if line == "" or line.startswith("## " + version):
break
while True:
line = stream.readline()
if line == "" or line.startswith("## "):
break
body += line
# Send the request to create the release:
response = requests.post(
headers={
Expand All @@ -103,7 +116,7 @@ jobs:
json={
"tag_name": f"v{version}",
"name": f"Release {version}",
"body": f"See the CHANGES.md file for details.",
"body": body,
},
url=(
"https://api.github.com"
Expand Down

0 comments on commit 868dfb2

Please sign in to comment.