-
Notifications
You must be signed in to change notification settings - Fork 81
/
azure-pipelines.yml
63 lines (60 loc) · 1.52 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
trigger:
batch: true
branches:
include:
- master
- dev
pool:
vmImage: 'windows-latest'
variables:
buildConfiguration: 'release'
projects: 'src/**/*.csproj'
steps:
- task: NuGetToolInstaller@1
displayName: 'Use Nuget'
inputs:
versionSpec:
checkLatest: true
- task: UseDotNet@2
displayName: Use Dotnet
inputs:
packageType: sdk
version: 9.x
- task: NuGetCommand@2
displayName: 'restoring'
inputs:
command: 'restore'
restoreSolution: '**/*.sln'
feedsToUse: 'select'
- task: DotNetCoreCLI@2
displayName: 'building'
inputs:
command: 'build'
projects: $(projects)
arguments: '-c $(buildConfiguration)'
- task: DotNetCoreCLI@2
displayName: 'testing'
inputs:
command: 'test'
projects: '**/*.Tests.csproj'
- task: DotNetCoreCLI@2
displayName: 'packing'
condition: eq(variables['build.sourceBranch'], 'refs/heads/dev')
inputs:
command: 'custom'
projects: $(projects)
custom: 'pack'
arguments: '-c $(buildConfiguration) --no-build -o $(Build.ArtifactStagingDirectory) --version-suffix dev$(Build.BuildNumber)'
- task: DotNetCoreCLI@2
displayName: 'packing'
condition: eq(variables['build.sourceBranch'], 'refs/heads/master')
inputs:
command: 'custom'
projects: $(projects)
custom: 'pack'
arguments: '-c $(buildConfiguration) --no-build -o $(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'packages'
publishLocation: 'Container'