-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
47 lines (40 loc) · 1.24 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
trigger:
- master
- develop
pool:
vmImage: 'VS2017-Win2016'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- task: UseDotNet@2
displayName: 'Use .NET Core sdk'
inputs:
packageType: sdk
version: 3.0.*
installationPath: $(Agent.ToolsDirectory)/dotnet
- task: DotNetCoreCLI@2
displayName: Build
inputs:
projects: |
src/**/*.csproj
arguments: '--configuration $(BuildConfiguration)'
- task: DotNetCoreCLI@2
displayName: Test
inputs:
command: test
projects: |
tests/**/*.csproj
arguments: '--configuration $(BuildConfiguration)'
- script: dotnet pack --configuration $(buildConfiguration) --no-build --output %Build_ArtifactStagingDirectory%
condition: and(succeeded(), or(eq(variables['Build.SourceBranchName'], 'master'),eq(variables['Build.SourceBranchName'], 'develop')))
displayName: Pack
- task: NuGetCommand@2
displayName: Publish
condition: and(succeeded(), or(eq(variables['Build.SourceBranchName'], 'master'),eq(variables['Build.SourceBranchName'], 'develop')))
inputs:
command: push
nuGetFeedType: external
publishFeedCredentials: 'NewOrbit MyGet Nuget'
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg'