forked from WorkMaze/JUST.net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
66 lines (56 loc) · 1.63 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
63
64
65
66
trigger:
branches:
include:
- master
- dev
paths:
include:
- src/*
- test/*
- azure-pipelines.yml
pr:
branches:
include:
- '*'
pool:
vmImage: 'windows-latest'
variables:
buildConfiguration: 'Release'
steps:
- checkout: self
persistCredentials: true
fetchDepth: 1000
- task: NuGetToolInstaller@1
inputs:
versionSpec: '5.x'
- task: NuGetCommand@2
inputs:
command: 'restore'
restoreSolution: 'JUST.NET.sln'
feedsToUse: 'select'
vstsFeed: 'f7087ef5-bf6f-48b2-8b8b-5e513f4a7a9e'
- task: MSBuild@1
inputs:
solution: 'JUST.NET.sln'
configuration: '$(buildConfiguration)'
- task: DotNetCoreCLI@2
displayName: 'Run unit tests - $(buildConfiguration)'
inputs:
command: 'test'
arguments: '--configuration $(buildConfiguration) /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:CoverletOutput=$(Build.SourcesDirectory)/TestResults/Coverage/'
publishTestResults: true
projects: '**/*.Test.csproj'
- task: NuGetCommand@2
inputs:
command: 'pack'
packagesToPack: '**/JUST.net.csproj;!**/JUST.NET.csproj'
configuration: '$(buildConfiguration)'
versioningScheme: 'off'
- task: NuGetCommand@2
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/JUST.net.*.nupkg;!$(Build.ArtifactStagingDirectory)/JUST.net.*.symbols.nupkg'
nuGetFeedType: 'internal'
publishVstsFeed: 'f7087ef5-bf6f-48b2-8b8b-5e513f4a7a9e'
allowPackageConflicts: true