Skip to content

Commit 8f8564b

Browse files
committed
Fix release workflow.
1 parent f414f5e commit 8f8564b

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

tasks.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,18 +117,22 @@ def release(ctx, notest=True):
117117
ctx.run("pytest maml")
118118
with open("CHANGES.rst") as f:
119119
contents = f.read()
120-
toks = re.split(r"\#+", contents)
120+
toks = re.split(r"\-+", contents)
121121
desc = toks[1].strip()
122+
toks = desc.split("\n")
123+
desc = "\n".join(toks[:-1]).strip()
122124
payload = {
123125
"tag_name": "v" + NEW_VER,
124126
"target_commitish": "master",
125127
"name": "v" + NEW_VER,
126128
"body": desc,
127129
"draft": False,
128-
"prerelease": False
130+
"prerelease": False,
129131
}
130132
response = requests.post(
131-
"https://api.github.com/repos/materialsvirtuallab/maml/releases",
133+
"https://api.github.com/repos/materialsproject/pymatgen/releases",
132134
data=json.dumps(payload),
133-
headers={"Authorization": "token " + os.environ["GITHUB_RELEASES_TOKEN"]})
135+
headers={"Authorization": "token " + os.environ["GITHUB_RELEASES_TOKEN"]},
136+
)
134137
print(response.text)
138+

0 commit comments

Comments
 (0)