I want to kick off an npm deployment when a tag, that looks like a semantic version, is pushed, e.g. v1.2.3
. I see that the tag name is in the TRAVIS_TAG
environment variable and that I can specify an on:
condition, which "can be any Bash condition". I have no idea what to write here and how to debug it.
- provider: npm
on:
tags: true
all_branches: true
condition: ???
Ideally, I would like to not bother with Bash at all - I would like the condition to execute a Node.js script and then decide whether to deploy or not depending on the node exit code. How can I do that?