From 4806c36ea99b7b25b18596031958833ce1e583fd Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 18 Dec 2018 13:54:49 +0900 Subject: [PATCH] Correctly parse tags --- azure-pipelines-template.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/azure-pipelines-template.yml b/azure-pipelines-template.yml index 6234b0f..25ecc8c 100644 --- a/azure-pipelines-template.yml +++ b/azure-pipelines-template.yml @@ -12,17 +12,26 @@ steps: timeoutInMinutes: 120 displayName: Build +- bash: | + BRANCH=$(Build.SourceBranch) + TAG=${BRANCH:10} + echo "##vso[task.setvariable variable=Name;isOutput=true]$TAG" + displayName: Get Tag Name + name: Tag + condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/') + - task: GithubRelease@0 displayName: Create GitHub Release - condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/v') + condition: startsWith(variables['Tag.Name'], 'v') inputs: gitHubConnection: GitHub Yue repositoryName: yue/yode - action: create + action: Edit tagSource: auto - tag: $(Release.Tag) - title: Yode $(Release.Tag) + tag: $(Tag.Name) + title: Yode $(Tag.name) releaseNotes: (placeholder) assets: 'out/Release/*.zip' assetUploadMode: replace isDraft: true + addChangelog: false