For reference, this is the way I managed to do it as of March 2016 starting with the link mentioned in this comment:
-
Added
HEROKU_API_LOGIN(fromheroku auth:whoami) andHEROKU_API_KEY(fromheroku auth:token) as protected ENV variables in the travis.org build settings. Alternatively, they can be added in the.travis.ymlwith:travis encrypt HEROKU_API_LOGIN ="$(heroku auth:whoami)" --add travis encrypt HEROKU_API_KEY="$(heroku auth:token)" --add
-
Added following lines to the
.travis.yml: