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:

  1. prereqs
  apt install ruby ruby-dev
  1. setup non-sudo gem install path
  2. install Travis-CI client
  gem install travis -no-rdoc -no-ri
  1. link the executable to a directory on your PATH
  ln -s ~/gems/gems/travis-1.8.9/bin/travis ~/.local/bin

Usage

  1. change to the directory of your GitHub repo, and then sh travis setup releases
  2. generate an Oauth token with public_repo only checked. Consider using a GitHub “machine account” for better per-repo permissions.
  3. 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]