Reputation: 19803
I want to trigger Travis CI to build and deploy when I create tag via github web interface. I can't find information about triggers for Travis CI. So can I do it?
Upvotes: 16
Views: 7580
Reputation: 6916
A build should automatically start when a new tag is created. To deploy you have to add the follow bit to the deploy
section:
on:
tags: true
Here is a complete example:
language: php
php:
- 5.3
- 5.4
deploy:
provider: heroku
strategy: git
skip_cleanup: true
app: myapp
on:
tags: true
php: '5.4'
api_key:
secure: NL10DAVFJJPk7mHdKeN3q5hpKgRq/gKpEnsXeBb7dDcnW0XuwmO88srMVbYHOA6w3kw50aPkKZ1AirElPjcpm2uxEz/tW7PpshY8fGDKdCyuczXKh24avTpD8nF8lskTIPXVpwWBYxCoFziRsd+eQBKHCsRyrQcv0mjg2j2MoNE=
Travis CI has a nice documentation about all the possibilities.
Upvotes: 13