Skip to content

Commit

Permalink
Merge pull request #2379 from FirelyTeam/devops/releasenotes-generator
Browse files Browse the repository at this point in the history
Changed Azure Pipeline to reflect new structure
  • Loading branch information
marcovisserFurore committed Jan 31, 2023
2 parents 0975f2d + ac561b9 commit 4b203da
Showing 1 changed file with 8 additions and 27 deletions.
35 changes: 8 additions & 27 deletions build/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,27 +112,13 @@ stages:
pathToPublish: $(Build.ArtifactStagingDirectory)
ArtifactName: NuGetPackages
- bash: |
echo $(Build.SourceBranchName)
version=$(Build.SourceBranchName)
title_release="${version:1}"
IFS='-'
read -a version <<<"$(Build.SourceBranchName)"
release=${version[1]}
echo $release
currenttag=$(git tag --sort=v:refname | grep -E "^v.*-$release$" | tail -1)
previoustag=$(git tag --sort=v:refname | grep -E "^v.*-$release$" | tail -2 | head -n 1)
title_release="${version[0]:1} for ${version[1]^^} (release $(date '+%Y%m%d'))"
echo $currenttag
echo $previoustag
echo $title_release
echo "##vso[task.setvariable variable=current_tag;isOutput=true]$currenttag"
echo "##vso[task.setvariable variable=previous_tag;isOutput=true]$previoustag"
echo "##vso[task.setvariable variable=release_title;isOutput=true]$title_release"
name: tagnames
displayName: Determine tagnames
displayName: Determine release title
- stage: test
displayName: Test
Expand Down Expand Up @@ -290,7 +276,7 @@ stages:
displayName: 'NuGet Push packages'
inputs:
command: push
packagesToPush: '$(Agent.BuildDirectory)/NuGetPackages/*.nupkg'
packagesToPush: '$(Agent.BuildDirectory)/NuGetPackages/*.*nupkg'
nuGetFeedType: external
publishFeedCredentials: NuGet
verbosityPush: normal
Expand All @@ -300,10 +286,6 @@ stages:
displayName: Release Notes
environment: NuGet
variables:
- name: curTag
value: $[ stageDependencies.build.restoreAndBuild.outputs['tagnames.current_tag'] ]
- name: prevTag
value: $[ stageDependencies.build.restoreAndBuild.outputs['tagnames.previous_tag'] ]
- name: releaseTitle
value: $[ stageDependencies.build.restoreAndBuild.outputs['tagnames.release_title'] ]
strategy:
Expand All @@ -314,16 +296,15 @@ stages:
- task: GitHubRelease@1
displayName: 'GitHub release notes (create)'
inputs:
gitHubConnection: 'GitHub Fhir-net-api'
gitHubConnection: 'GitHub Firely-net-sdk'
repositoryName: '$(Build.Repository.Name)'
action: 'create'
target: '$(Build.SourceVersion)'
tagSource: userSpecifiedTag
tag: '$(curTag)'
tagSource: gitTag
tagPattern: 'v.*'
title: '$(releaseTitle)'
isDraft: true
changeLogCompareToRelease: lastNonDraftReleaseByTag
changeLogCompareToReleaseTag: '$(prevTag)'
changeLogCompareToRelease: lastNonDraftRelease
changeLogType: issueBased
changeLogLabels: '[{ "label" : "bug", "displayName" : "Bugfixes", "state" : "closed" },{ "label" : "enhancement", "displayName" : "New Functionality", "state" : "closed" }]'

0 comments on commit 4b203da

Please sign in to comment.