-
Notifications
You must be signed in to change notification settings - Fork 2
/
azure-pipelines.yml
54 lines (47 loc) · 1.47 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
name: 0.7.0$(Rev:.r)
pool:
vmImage: 'windows-latest'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
publishVstsFeed: 'dotnet-newrepo/dotnet-newrepo'
steps:
- task: DotNetCoreCLI@2
displayName: restore
inputs:
command: restore
projects: '**/*.csproj'
verbosityRestore: normal
includeNuGetOrg: true
- task: VSBuild@1
displayName: build
inputs:
solution: '$(solution)'
msbuildArgs: '/p:Version=$(build.buildNumber) /p:PackageOutputPath="$(build.artifactStagingDirectory)"'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
maximumCpuCount: true #enable parallel build
logFileVerbosity: minimal
- task: DotNetCoreCLI@2
displayName: test
inputs:
command: test
projects: 'test/**/*.csproj'
arguments: '--configuration $(buildConfiguration) --collect "Code coverage" -p:ParallelizeTestCollections=true'
- task: DotNetCoreCLI@2
displayName: 'push to project feed'
inputs:
command: 'push'
searchPatternPush: '$(Build.ArtifactStagingDirectory)/**/*.*pkg'
includesymbols: true
includesource: true
publishVstsFeed: '$(publishVstsFeed)'
# task to publish to nuget.org feed (only for release branches)
- task: NuGetCommand@2
displayName: 'NuGet push nuget.org feed'
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'))
inputs:
command: push
nuGetFeedType: external
publishFeedCredentials: nuget.org