How to deploy based on some condition in travis?

Currently, I have the travis deploy configuration like this:

deploy:
  on:
    tags: true

But I want to add the deploy based on some condition something like this

if branch=='something'
deploy:
  on:
    tags: true

Hey @Spineswitch,

Yeah you can use regex in this usecase in Travis, so you can do something like:

on:
  all_branches: true
  condition: $TRAVIS_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+

If you give me your whole .travis.yml file, I can edit it for you and make it work for you - if you think this is helpful enough that’s great too.

1 Like