-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
75 lines (64 loc) · 1.8 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
trigger:
- main
pool:
vmImage: windows-latest
variables:
BuildConfiguration: 'Debug'
SolutionName: CodeGator.DataAnnotations
SolutionPath: 'src/$(SolutionName)'
steps:
- checkout: self
displayName: 'github checkout'
fetchDepth: 0
- task: UseDotNet@2
displayName: 'dotnet install'
inputs:
packageType: 'sdk'
useGlobalJson: true
- task: NuGetToolInstaller@1
displayName: 'nuget install'
inputs:
versionSpec:
checkLatest: true
- task: DotNetCoreCLI@2
displayName: 'dotnet restore'
inputs:
command: 'restore'
nugetConfigPath: 'nuget.config'
feedsToUse: config
arguments: '--interactive'
projects: '$(SolutionPath).sln'
- task: DotNetCoreCLI@2
displayName: 'dotnet build'
inputs:
command: 'build'
arguments: '--configuration $(BuildConfiguration) /p:SourceRevisionId=$(Build.SourceVersion)'
projects: '$(SolutionPath).sln'
- task: DotNetCoreCLI@2
displayName: "dotnet test"
inputs:
command: 'test'
projects: '$(SolutionPath).sln'
arguments: '--configuration $(BuildConfiguration) /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura'
publishTestResults: true
nobuild: true
- task: DotNetCoreCLI@2
displayName: "dotnet pack"
inputs:
command: 'pack'
arguments: '--configuration $(BuildConfiguration)'
packagesToPack: '$(SolutionPath).sln'
nobuild: true
includesymbols: true
includesource: true
versioningScheme: 'off'
- task: NuGetCommand@2
displayName: 'nuget external push'
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg'
nuGetFeedType: 'external'
publishFeedCredentials: 'NUGET.ORG'
versioningScheme: 'off'
allowPackageConflicts: true
arguments: -SkipDuplicate