-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathazure-pipelines.yml
62 lines (50 loc) · 1.54 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
trigger:
- main
- master
pr:
branches:
include:
- '*'
pool:
name: BKHosted
variables:
buildConfiguration: 'Release'
IsMain: $[in(variables['Build.SourceBranch'], 'refs/heads/main', 'refs/heads/master')]
steps:
- task: UseDotNet@2
displayName: 'Use .NET 6'
inputs:
version: 6.0.x
- task: DotNetCoreCLI@2
displayName: 'dotnet build'
continueOnError: false
inputs:
projects: '**/*.sln'
arguments: '-c release'
- task: DotNetCoreCLI@2
displayName: Test
continueOnError: false
inputs:
command: test
projects: '**/*.sln'
arguments: '--configuration $(BuildConfiguration) --no-build /p:CollectCoverage=true "/p:CoverletOutputFormat=\"opencover,lcov\"" /p:CoverletOutputDirectory=$(Build.SourcesDirectory)\TestResults\Coverage'
- task: DotNetCoreCLI@2
displayName: 'dotnet pack debug'
condition: eq(variables.IsMain, 'true')
continueOnError: false
inputs:
command: custom
projects: 'src/**/*.csproj'
custom: pack
arguments: '-c debug --include-symbols --include-source --version-suffix "pre-$(Build.BuildNumber)" -o $(build.artifactstagingdirectory)\packages\debug'
- task: DotNetCoreCLI@2
displayName: 'dotnet pack release'
condition: eq(variables.IsMain, 'true')
inputs:
command: custom
projects: 'src/**/*.csproj'
custom: pack
arguments: '--output $(build.artifactstagingdirectory)\packages\release --include-symbols --include-source'
- task: PublishBuildArtifacts@1
condition: eq(variables.IsMain, 'true')
displayName: 'Publish Artifact: drop'