This is wercker deploy step for tcnksm/ghr, create Github Release and uploading artifacts there.
In the wercker.yml
of your application use the following step definition:
steps:
- tcnksm/ghr:
token: $GITHUB_TOKEN
input: dist
To use this step, you need to set $GITHUB_TOKEN
and input
directory. About $GITHUB_TOKEN
see at Github Token section. input
directory is where your artifacts you want to upload are in and it would be in ${WERCKER_OUTPUT_DIR}
passed from build step.
You can control build with some option from wercker.yml
:
steps:
- tcnksm/ghr:
token: $GITHUB_TOKEN
input: dist
version: v0.1.0 # Relase tag default is `pre-release`
pre_release: true # Relase as pre-release default is false
replace: true # Replace release if it exists
See tcnksm-sample/wercker-golang. This simple golang repository is continuously cross-compiled and relase as pre-prerelease
, you can always provide new builds to user.
To be able to use this step, you will first need to create a GitHub token with an account which has enough permissions to be able to create releases. First goto Account settings
, then goto Applications
for the user. Here you can create a token in the Personal access tokens
section. For a private repository you will need the repo
scope and for a public repository you will need the public_repo
scope. Then it is recommended to save this token on wercker as a protected environment variable.