@@ -4,7 +4,7 @@ variables:
44- name : TestProject
55 value : ' **/*UnitTests.csproj'
66
7- name : v $(Major).$(Minor).$(Patch)
7+ name : $(Major).$(Minor).$(Patch).$(Build )
88
99trigger :
1010- main
@@ -24,19 +24,25 @@ steps:
2424 inputs :
2525 command : ' test'
2626 projects : $(TestProject)
27- arguments : ' --configuration $(buildConfiguration) --collect "Code coverage"'
28- - task : PublishTestResults@2
29- displayName : " Publish Test Results"
27+ arguments : ' --configuration $(buildConfiguration) --collect:"XPlat Code Coverage"'
28+ - task : PublishCodeCoverageResults@1
3029 inputs :
31- testRunner : VSTest
32- testResultsFiles : ' **\*.trx'
30+ codeCoverageTool : ' Cobertura'
31+ summaryFileLocation : $(Agent.TempDirectory)/*/coverage.cobertura.xml # using ** instead of * finds duplicate coverage files
32+ # Workaraound for the pack command not accepting arguments
33+ # https://github.com/microsoft/azure-pipelines-tasks/issues/11640
3334 - task : DotNetCoreCLI@2
34- displayName : " Pack Project "
35+ displayName : Pack
3536 inputs :
36- command : ' pack'
37- packagesToPack : ' **/*.csproj'
38- versioningScheme : byEnvVar
39- versionEnvVar : PackageVersion
37+ command : custom
38+ custom : pack
39+ arguments : >
40+ RfmOta.sln
41+ --output $(Build.ArtifactStagingDirectory)
42+ -p:PackageVersion=$(PackageVersion)
43+ -p:Configuration=$(BuildConfiguration)
44+ -p:Version=$(PackageVersion)
45+ -p:AssemblyVersion=$(Build.BuildNumber)
4046 - task : GitHubRelease@1
4147 displayName : " Publish Relase To GitHub"
4248 inputs :
4551 action : ' create'
4652 target : ' $(Build.SourceVersion)'
4753 tagSource : ' userSpecifiedTag'
48- tag : ' $(Build.BuildNumber)'
49- title : ' $(Build.BuildNumber) - $(BuildConfiguration) - $(Build.SourceBranchName)'
54+ tag : ' v $(Build.BuildNumber)'
55+ title : ' v $(Build.BuildNumber) - $(BuildConfiguration) - $(Build.SourceBranchName)'
5056 changeLogCompareToRelease : ' lastFullRelease'
5157 changeLogType : ' commitBased'
0 commit comments