-
Notifications
You must be signed in to change notification settings - Fork 7
/
azure-pipelines.yml
62 lines (54 loc) · 1.32 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:
branches:
include:
- master
tags:
include:
- ?.?.?
pr:
- master
pool:
vmImage: 'windows-latest'
variables:
buildConfiguration: 'Release'
jobs:
- job: CI
displayName: 'Continuous Integration'
steps:
- task: DotNetCoreCLI@2
displayName: Restore
inputs:
command: 'restore'
feedsToUse: 'select'
- task: DotNetCoreCLI@2
displayName: Build
inputs:
command: 'build'
projects: '**/*.csproj'
configuration: '$(buildConfiguration)'
- task: DotNetCoreCLI@2
displayName: Test
inputs:
command: 'test'
projects: '**/*.csproj'
configuration: '$(buildConfiguration)'
- job: CD
displayName: 'Continuous Deployment'
dependsOn: CI
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')
steps:
- task: DotNetCoreCLI@2
displayName: 'Pack'
inputs:
command: 'pack'
packagesToPack: '**/*.csproj;!**/*.Tests.csproj'
configuration: '$(buildConfiguration)'
includesymbols: true
includesource: true
versioningScheme: 'off'
- task: NuGetCommand@2
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg'
nuGetFeedType: 'external'
publishFeedCredentials: 'NuGetConnection'