Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Upload release assets to Github from the command line
"""Upload release assets to a GitHub release
First create a release on Github, then:
python 1.2.0 my_data.tgz
import sys
with open("GITHUB_TOKEN") as f:
from github import Github
g = Github(TOKEN)
repo = g.get_repo(REPOSITORY)
release = repo.get_release(sys.argv[1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment