-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create GitHub "releases"? #2328
Comments
I'd like to have this feature. Is there a way that it can be made to work without adding any steps to the developer's workflow? That is, the current release workflow is to run Preferably this behavior should be implemented at jaraco/skeleton and then ported over here. Would you be willing to work out the implementation? |
Extra credit if the release notes can be extracted from the changelog so they're actually published. |
Yep, I can have a look! Here's the simplest, using GitHub Actions: It runs when a tag is pushed, for example in my fork:
Pros:
Cons:
To do it as part of First question, would that be an acceptable requirement? (I see There's a bunch of CLI tools that already exist for creating releases, or it should be pretty straightforward to call the API via requests or curl.
|
Well that's pretty easy: #!/usr/bin/env python3
import json
import os
import sys
from urllib.request import Request, urlopen
repo = sys.argv[1]
tag = sys.argv[2]
token = os.environ["GITHUB_TOKEN"]
url_template = "https://{}.github.com/repos/" + repo + "/releases"
json.loads(
urlopen(
Request(
url_template.format("api"),
json.dumps({"tag_name": tag, "name": tag}).encode(),
headers={
"Accept": "application/vnd.github.v3+json",
"Authorization": "token " + token,
},
)
)
.read()
.decode()
) python create-release.py "hugovk/setuptools" v49.6.0.5 -> https://github.com/hugovk/setuptools/releases/tag/v49.6.0.5 Re: https://docs.github.com/en/rest/reference/repos#releases |
Please see PR #2338. |
I've seen the proposed fix isn't working, because the mapping from |
I got the notification for https://github.com/pypa/setuptools/releases/tag/v50.1.0, thank you! |
Tags show up at https://github.com/pypa/setuptools/releases
When tagging and releasing, would it be possible to also publish a GitHub release of that tag?
This enables users to watch "Releases only" for this repo, and get notifications on new release via the GH UI.
How to do it:
There's no need to add a title or body text.
Example:
This can be automated using GitHub Actions:
Thanks!
The text was updated successfully, but these errors were encountered: