In Azure Pipeline is possible use predefined build variables (DevOps Services) Build.SourceBranch and Build.SourceBranchName but their values at case commit with tag are tag