Run a build step only if we’re building the master branch (when using visual pipelines)

Use eq(variables['Build.SourceBranch'], 'refs/heads/master') for Control Options -> Run this task -> Custom conditions

_via https://docs.microsoft.com/en-us/azure/devops/pipelines/process/conditions_