How to start Travis CI deploy only when tag name matches a regex

梦想的初衷 提交于 2019-12-03 01:22:27

Simplest way would still be with bash, this example will deploy only if tag name matches the regex "release.*":

on:
    tags: true
    all_branches: true
    condition: "$TRAVIS_TAG =~ ^release.*$"

Check out this link for more info on travis environment variables: http://docs.travis-ci.com/user/ci-environment/#Environment-variables

pomber

eshizari's answer didn't work for me. This is the approach that I'm using instead:

on:
  all_branches: true
  condition: $TRAVIS_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!