hub
official Go-based GitHub CLI tool
https://github.com/github/hub
An Ubuntu package as added as of 19.04: https://packages.ubuntu.com/search?keywords=hub | https://github.com/github/hub/issues/718
sudo apt install hub
Otherwise, for older Ubuntu, first install Go. On Ubuntu: https://askubuntu.com/questions/959932/installation-instructions-for-golang-1-9-into-ubuntu-16-04/1075726#1075726
Then install hub
:
go get github.com/github/hub
Once hub
is installed, from inside your repo:
hub release create -a prebuilt.zip -m 'release title' tag-name
This:
- prompts for your password the first time, and then automatically creates and stores an API token locally
- creates a non annotated tag on the remote called
tag-name
- creates a release associated to that tag
- uploads
prebuilt.zip
as an attachment
You can also provide your existing API token with the GITHUB_TOKEN
environment variable.
For other release
operations, see:
hub release --help
Tested on hub
de684cb613c47572cc9ec90d4fd73eef80aef09c.
Python example without any dependencies
If you are like me and don't want to install yet another language:
Can someone give a python requests example of uploading a release asset in github?