Easily ship your project to your user using Github Releases
ghr
enable you to create Release on Github and upload your artifacts to it. ghr
will parallelize upload multiple artifacts.
Result is here.
Run it in your project directory:
$ ghr [option] <tag> <artifacts>
You need to set GITHUB_TOKEN
environmental variable:
$ export GITHUB_TOKEN="....."
To upload all package in pkg
directory with tag v0.1.0
$ ghr v0.1.0 pkg/
--> Uploading: pkg/0.1.0_SHASUMS
--> Uploading: pkg/ghr_0.1.0_darwin_386.zip
--> Uploading: pkg/ghr_0.1.0_darwin_amd64.zip
--> Uploading: pkg/ghr_0.1.0_linux_386.zip
--> Uploading: pkg/ghr_0.1.0_linux_amd64.zip
--> Uploading: pkg/ghr_0.1.0_windows_386.zip
--> Uploading: pkg/ghr_0.1.0_windows_amd64.zip
You can set some options:
$ ghr \
-t <token> \ # Set Github API Token
-u <username> \ # Set Github username
-r <repository> \ # Set repository name
-p <num> \ # Set amount of parallelism (Default is number of CPU)
--draft \ # Release as draft (Unpublish)
--prerelease \ # Crate prerelease
<tag> <artifacts>
If you are OSX user, you can use Homebrew:
$ brew tap tcnksm/ghr
$ brew install ghr
If you are in another platform, you can install it with curl
:
$ L=/usr/local/bin/ghr && curl -sL -A "`uname -sp`" http://ghr.herokuapp.com/ghr.zip | zcat >$L && chmod +x $L
You can also download binary from relase page and place it in $PATH
directory.
- aktau/github-release -
github-release
can also create and edit releases and upload artifacts. It has many options.ghr
is a simple alternative. Andghr
will parallelize upload artifacts.
- Fork (https://github.com/tcnksm/ghr/fork)
- Create a feature branch
- Commit your changes
- Rebase your local changes against the master branch
- Run test suite with the
make test
command and confirm that it passes - Run
gofmt -s
- Create new Pull Request
You can get source with go get
:
$ go get -d github.com/tcnksm/ghr
$ cd $GOPATH/src/github.com/tcnksm/cli-init
$ make install