-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
70 lines (60 loc) · 1.58 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
pool:
vmImage: 'windows-latest'
trigger:
branches:
include:
- '*'
tags:
include:
- '*'
pr:
branches:
include:
- '*'
steps:
- task: UseDotNet@2
displayName: 'Install .NET Core 6.0.x SDK'
inputs:
packageType: sdk
version: '6.0.x'
- task: DotNetCoreCLI@2
displayName: 'Install GitVersion'
inputs:
command: 'custom'
custom: 'tool'
arguments: 'update -g gitversion.tool --version 5.11.*'
- task: PowerShell@2
displayName: 'Update build number and project version from GitVersion metadata'
inputs:
filePath: azure-pipelines-version.ps1
- task: NuGetToolInstaller@1
inputs:
versionSpec: '6.4.0'
- task: DotNetCoreCLI@2
displayName: 'Build the solution'
inputs:
command: 'build'
projects: '*.sln'
arguments: '--configuration Debug'
- task: DotNetCoreCLI@2
displayName: 'Testing the solution'
inputs:
command: 'test'
projects: '*.sln'
arguments: '--configuration Debug'
- task: DotNetCoreCLI@2
displayName: 'Creating NuGet package (with debug symbols)'
condition: and(succeeded(), not(eq(variables['Build.Reason'], 'PullRequest')))
inputs:
command: 'pack'
packagesToPack: '**/*.csproj'
includesymbols: true
versioningScheme: 'off'
- task: NuGetCommand@2
displayName: 'Pushing NuGet package'
condition: and(succeeded(), not(eq(variables['Build.Reason'], 'PullRequest')))
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.snupkg'
nuGetFeedType: 'external'
publishFeedCredentials: 'NuGet'