title: How to get Git Tag in Azure Pipelines
body: <p>In Azure Pipelines, I have enabled git tags to trigger pipelines like so:</p>
  
  <pre><code>trigger:
    branches:
      include:
      - '*'
    tags:
      include:
      - '*'
  </code></pre>
  
  <p>Now I want to know if there is a way to determine programmatically:</p>
  
  <ol>
  <li>Was the pipeline started from a git commit or git tag?</li>
  <li>If the pipeline was started from a git tag, what is the tag name?</li>
  </ol>