-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
51 lines (43 loc) · 1.11 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
trigger:
- main
pool:
vmImage: 'ubuntu-20.04'
variables:
SOLUTION: '**/*.sln'
BUILD_CONFIGURATION: 'Release'
steps:
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '7.0.x'
displayName: Use .NET 7.0
- task: DotNetCoreCLI@2
inputs:
command: 'restore'
projects: $(SOLUTION)
displayName: Restore
- task: DotNetCoreCLI@2
inputs:
command: 'build'
projects: $(SOLUTION)
arguments: '--configuration $(BUILD_CONFIGURATION) --no-restore'
displayName: 'Build'
- task: DotNetCoreCLI@2
inputs:
command: 'test'
projects: test/**/*.Tests.csproj
arguments: '--configuration $(BUILD_CONFIGURATION) --no-build'
displayName: 'Unit Test'
- task: DotNetCoreCLI@2
inputs:
command: 'pack'
packagesToPack: 'src/**/*.csproj'
arguments: '--configuration $(BUILD_CONFIGURATION) --no-build --include-symbols'
versioningScheme: 'off'
packDirectory: '$(Build.ArtifactStagingDirectory)'
displayName: 'Pack'
- task: PublishPipelineArtifact@1
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)'
publishLocation: 'pipeline'
displayName: 'Publish Artifact'