Skip to content

Instantly share code, notes, and snippets.

@Menziess
Created June 15, 2024 15:06
Show Gist options
  • Save Menziess/a85af0d0912472d433c447e4319852b5 to your computer and use it in GitHub Desktop.
Save Menziess/a85af0d0912472d433c447e4319852b5 to your computer and use it in GitHub Desktop.
name: $(BuildID)
trigger:
- master
- feature/*
- refs/tags/*
variables:
${{ if startsWith(variables['Build.SourceBranch'], 'refs/tags/') }}:
group: prd
tag: $[ replace(variables['Build.SourceBranchName'], 'v', '') ]
${{ elseif in(variables['Build.SourceBranchName'], 'main', 'master') }}:
group: acp
tag: SNAPSHOT
${{ else }}:
group: dev
tag: $[ replace(replace(variables['Build.SourceBranch'], 'refs/heads/', ''), '/', '-') ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment