diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2022-09-30 06:12:59 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2022-09-30 06:12:59 -0400 |
commit | 8bdaafe103e36ec6428a5bf8d1d6a807a1269a1f (patch) | |
tree | e5fa64826a5a854637ba6710c0b8ed05f3a8585c /ci | |
parent | 0a885162775d32d6f8932690fdbd167b45618e03 (diff) | |
download | python-coveragepy-git-8bdaafe103e36ec6428a5bf8d1d6a807a1269a1f.tar.gz |
build: gh releases have pypi link and installation instruction
Diffstat (limited to 'ci')
-rw-r--r-- | ci/github_releases.py | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/ci/github_releases.py b/ci/github_releases.py index 166011fb..9a36a586 100644 --- a/ci/github_releases.py +++ b/ci/github_releases.py @@ -74,15 +74,29 @@ def get_releases(session, repo): releases = { r['tag_name']: r for r in github_paginated(session, url) } return releases +RELEASE_BODY_FMT = """ +{relnote_text} + +--- +PyPI page: [coverage {version}](https://pypi.org/project/coverage/{version}) + +To install: +``` +$ python3 -m pip install coverage=={version} +``` +""" + def release_for_relnote(relnote): """ Turn a release note dict into the data needed by GitHub for a release. """ - tag = relnote['version'] + relnote_text = relnote["text"] + tag = version = relnote["version"] + body = RELEASE_BODY_FMT.format(relnote_text=relnote_text, version=version) return { "tag_name": tag, - "name": tag, - "body": relnote["text"], + "name": version, + "body": body, "draft": False, "prerelease": relnote["prerelease"], } |