-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
41 lines (39 loc) · 1.21 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
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
buildConfiguration: 'Release'
steps:
- task: UseDotNet@2
displayName: 'Use .NET Core sdk >=3.x'
inputs:
packageType: sdk
# workaround for 'UseDotNet@2 cant find sdk version matching 3.x #11569'
# https://github.com/microsoft/azure-pipelines-tasks/issues/11569
version: 3.0.x
# version: 3.x
- task: DotNetCoreCLI@2
displayName: Build
inputs:
command: build
projects: 'src/**/*.csproj'
arguments: '-c $(buildConfiguration) -o $(Build.ArtifactStagingDirectory)/bin'
- task: DotNetCoreCLI@2
displayName: Test
inputs:
command: 'test'
projects: 'test/**/*.csproj'
arguments: '-c $(buildConfiguration)'
- task: PublishPipelineArtifact@1
displayName: 'Publish artifacts (bin)'
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)/bin'
artifact: 'bin'
- script: dotnet pack src/corgit/corgit.csproj -c $(buildConfiguration) --include-source --include-symbols -o $(Build.ArtifactStagingDirectory)/pkg --version-suffix ''CI-$(Build.BuildNumber)''
displayName: 'Pack'
- task: PublishPipelineArtifact@1
displayName: 'Publish artifacts (pkg)'
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)/pkg'
artifact: 'pkg'