From 8b3d72669663a2c105b80f2263f92bdeaade34df Mon Sep 17 00:00:00 2001 From: Petr Kotas Date: Thu, 1 Jul 2021 15:40:50 +0200 Subject: [PATCH] fix release notes generation --- .pipelines/go-build.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.pipelines/go-build.yaml b/.pipelines/go-build.yaml index 0f0913c..6356083 100644 --- a/.pipelines/go-build.yaml +++ b/.pipelines/go-build.yaml @@ -23,14 +23,18 @@ steps: make build displayName: Compile the code using makefile - script: | - MESSAGE=$(git for-each-ref refs/tags/$(Build.SourceBranch)) - echo "$MESSAGE" > release.txt + set -xe + TAG="$(git describe)" + MESSAGE="$(git for-each-ref refs/tags/$TAG --format='%(contents)')" + echo $(System.DefaultWorkingDirectory) + echo "$MESSAGE" > $(System.DefaultWorkingDirectory)/release.txt + displayName: Extract release notes from tag annotation - task: GithubRelease@0 displayName: Publish release notes inputs: githubConnection: k8s-object-lock repositoryName: petrkotas/k8s-object-lock action: create - releaseNotesFile: $(System.DefaultWorkingDirectory)/**/release.txt + releaseNotesFile: $(System.DefaultWorkingDirectory)/release.txt addChangeLog: true