diff --git a/azure-pipelines-official.yml b/azure-pipelines-official.yml index 57b0f66bb..b1fdb23cc 100644 --- a/azure-pipelines-official.yml +++ b/azure-pipelines-official.yml @@ -7,8 +7,10 @@ trigger: pr: none variables: - - name: prereleaseFlag - value: '' + ${{ if eq(variables['Build.SourceBranchName'], 'release') }}: + prereleaseFlag: '' + ${{ else }}: + prereleaseFlag: '--prerelease' stages: - stage: Build diff --git a/azure-pipelines.yml b/azure-pipelines.yml index bb9de852d..039f169a3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -14,8 +14,10 @@ pr: - main variables: - - name: prereleaseFlag - value: '' + ${{ if eq(variables['Build.SourceBranchName'], 'release') }}: + prereleaseFlag: '' + ${{ else }}: + prereleaseFlag: '--prerelease' stages: - stage: Build