-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
98 lines (86 loc) · 2.51 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
trigger:
batch: true
branches:
include:
- main
- develop
- release/*
paths:
exclude:
- README.md
pool:
name: Default
demands:
- msbuild
- visualstudio
- vstest
variables:
buildPlatform: 'x64'
steps:
- task: NuGetToolInstaller@1
displayName: 'Use NuGet 6.0.0'
inputs:
versionSpec: '6.0.0'
checkLatest: true
- task: GitVersion@5
inputs:
runtime: 'core'
configFilePath: 'GitVersion.yml'
- script: echo %Action%%BuildVersion%
displayName: 'Set build version'
env:
Action: '##vso[build.updatebuildnumber]'
BuildVersion: $(GitVersion.NugetVersionV2)
- task: VSBuild@1
displayName: 'Build solution WinProcessInfo.sln RELEASE'
inputs:
solution: 'WinProcessInfo.sln'
platform: 'x64'
configuration: 'Release'
maximumCpuCount: true
msbuildArchitecture: 'x64'
- task: CmdLine@2
inputs:
script: |
echo Running googletest
cd output\Release
basic_tests.exe --gtest_output=xml:..\..\TestResults\
- task: PublishTestResults@2
displayName: 'Publish Release Test Results **/TEST-*.xml'
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '**/TestResults/basic_tests.xml'
mergeTestResults: true
buildPlatform: 'x64'
buildConfiguration: 'Release'
continueOnError: true
- task: NuGetCommand@2
displayName: 'NuGet pack'
inputs:
command: 'pack'
packagesToPack: 'nuget/siddiqsoft.WinProcessInfo.nuspec;!nuget/siddiqsoft.WinProcessInfo.symbols.nuspec'
versioningScheme: 'off'
buildProperties: 'VERSION=$(build.buildNumber)'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
- task: NuGetCommand@2
displayName: 'NuGet push'
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg;build/*.nupkg;!build/*symbols.nupkg'
nuGetFeedType: 'external'
publishFeedCredentials: 'sqs-nuget'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
- task: GitHubRelease@1
inputs:
gitHubConnection: 'github-packages-sqs'
repositoryName: 'SiddiqSoft/WinProcessInfo'
action: 'create'
target: '$(Build.SourceVersion)'
tagSource: 'userSpecifiedTag'
tag: '$(build.buildNumber)'
title: 'v$(build.buildNumber)'
releaseNotesSource: 'inline'
isPreRelease: true
changeLogCompareToRelease: 'lastFullRelease'
changeLogType: 'commitBased'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))