简体   繁体   中英

Can I trigger travis ci to build my app by creating git tag?

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?

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM