-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathazure-pipelines.yml
55 lines (46 loc) · 1.27 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
# Build ASP.NET Core project using Azure Pipelines
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core?view=vsts
trigger:
- master
- release/*
pr:
- master
- release/*
pool:
vmImage: 'vs2017-win2016'
variables:
buildConfiguration: 'Release'
version: 2.2.0
steps:
- task: DotNetCoreCLI@2
displayName: 'dotnet build'
inputs:
command: build
arguments: -c $(buildConfiguration)
- task: DotNetCoreCLI@2
condition: succeeded()
displayName: 'dotnet test'
inputs:
command: test
arguments: -c $(buildConfiguration)
projects: '**/*Test.csproj'
- task: DotNetCoreCLI@2
condition: succeeded()
displayName: 'dotnet pack'
inputs:
command: pack
configuration: $(buildConfiguration)
verbosityPack: minimal
arguments: --configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory) /p:Version=$(version)
- task: PublishBuildArtifacts@1
displayName: 'Publish build artifacts'
condition: succeeded()
- task: NuGetCommand@2
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/release'))
displayName: 'nuget push'
inputs:
command: push
nuGetFeedType: external
publishFeedCredentials: 'IntelliTect-Nuget-Feed'
versioningScheme: byEnvVar
versionEnvVar: version