I have certain build logic, such as publication, that I would like to have Jenkins perform only when it is building a Git tag. How can I accomplish this using Jenkin's Declarative Pipeline?
In other words, I am trying to build functionality equivalent to Travis CI's deploy on tags functionality:
deploy:
[...]
on:
tags: true
There is a built-in condition to check the branch, but I do not see one that indicates the tag.