- Notifications
You must be signed in to change notification settings - Fork159
Commandline app to create and edit releases on Github (and upload artifacts)
License
github-release/github-release
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A small commandline app written in Go that allows you to easily createand delete releases of your projects on Github. In addition it allowsyou to attach files to those releases.
It interacts with thegithub releases API. Though it's entirelypossible todo all these things with cURL, it's not really thatuser-friendly. For example, you need to first query the API to find the id ofthe release you want, before you can upload an artifact.github-release
takescare of those little details.
It might still be a bit rough around the edges, pull requests arewelcome!
If you don't have the Go toolset installed, and you don't want to, butstill want to use the app, you can download binaries for your platformon thereleasespage. Yes, that'sdogfooding, check the makefile!
If you have Go installed, you can just do:
go get github.com/github-release/github-release
This will automatically download, compile and install the app.
After that you should have agithub-release
executable in your$GOPATH/bin
.
NOTE: for these examples I'vecreated a github token and set it asthe env variableGITHUB_TOKEN
.github-release
will automatically pick it upfrom the environment so that you don't have to pass it as an argument.
# set your tokenexport GITHUB_TOKEN=...# check the help$ github-release --help# make your tag and upload$ git tag ...&& git push --tags# check the current tags and existing releases of the repo$ github-release info -u aktau -r gofinancegit tags:- v0.1.0 (commit: https://api.github.com/repos/aktau/gofinance/commits/f562727ce83ce8971a8569a1879219e41d56a756)releases:- v0.1.0, name:'hoary ungar', description:'something something dark side 2', id: 166740, tagged: 29/01/2014 at 14:27, published: 30/01/2014 at 16:20, draft: ✔, prerelease: ✗ - artifact: github.go, downloads: 0, state: uploaded, type: application/octet-stream, size: 1.9KB, id: 68616# create a formal release$ github-release release \ --user aktau \ --repo gofinance \ --tag v0.1.0 \ --name"the wolf of source street" \ --description"Not a movie, contrary to popular opinion. Still, my first release!" \ --pre-release# you've made a mistake, but you can edit the release without# having to delete it first (this also means you can edit without having# to upload your files again)$ github-release edit \ --user aktau \ --repo gofinance \ --tag v0.1.0 \ --name"Highlander II: The Quickening" \ --description"This is the actual description!"# upload a file, for example the OSX/AMD64 binary of my gofinance app$ github-release upload \ --user aktau \ --repo gofinance \ --tag v0.1.0 \ --name"gofinance-osx-amd64" \ --file bin/darwin/amd64/gofinance# upload other files...$ github-release upload ...# you're not happy with it, so delete it$ github-release delete \ --user aktau \ --repo gofinance \ --tag v0.1.0
Therelease
command does not have an--auth-user
flag because in practice,Github ignores the--auth-user
flag when validating releases. The only thingthat matters is passing a token that has permission to create the release.
You can point to a different GitHub API endpoint via the environment variableGITHUB_API
:
export GITHUB_API=http://github.company.com/api/v3
Package | Description | License |
---|---|---|
github.com/dustin/go-humanize | humanize file sizes | MIT |
github.com/tomnomnom/linkheader | GH API pagination | MIT |
github.com/voxelbrain/goptions | option parsing | BSD |
github.com/kevinburke/rest | HTTP client | MIT |
- Check if an artifact is already uploaded before starting a new upload
Copyright (c) 2014-2017, Nicolas Hillegeer. All rights reserved.Copyright (c) 2020, Meter, Inc. All rights reserved.
About
Commandline app to create and edit releases on Github (and upload artifacts)
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors13
Uh oh!
There was an error while loading.Please reload this page.