Travis-CI client setup

Travis-CI can be used from the command line to setup deployments on release. This enables distribution of binaries (e.g. libraries, executables) as part of a GitHub Release.

Install

Install the Travis-CI client prereqs:

apt install ruby ruby-dev

Setup non-sudo gem install path and install Travis-CI client

gem install travis -no-rdoc -no-ri

Link the executable to a directory on your PATH:

ln -s ~/gems/gems/travis-1.8.9/bin/travis ~/.local/bin

Usage

Change to the directory of your GitHub repo, then:

travis setup releases

Generate an Oauth token with public_repo only checked. Consider using a GitHub “machine account” for better per-repo permissions.

Set an environment variable e.g. MYKEY in Travis-CI “settings” tab for each repo where the API key is needed, referencing that environment variable under the deploy: section as in example below:

Do not type the actual key value into .travis.yml!!

at bottom of .travis.yml:

deploy:
  provider: releases
  api_key:
    secure: ${MYKEY}
  file:
    - my.exe
  skip_cleanup: true
  on:
    repo: username/reponame
    tags: true

Notes

Travis-CI client install [reference]