forked from HachetteUK/huk-dotnet-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
111 lines (98 loc) · 2.45 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
resources:
- repo: self
clean: true
phases:
- phase: Phase_1
displayName: Phase 1 - Windows
condition: succeeded()
queue:
name: Hosted VS2017
steps:
- task: DotNetCoreCLI@2
displayName: 'dotnet build - src'
inputs:
projects: '**/src/*.csproj'
arguments: '-c Release'
- task: DotNetCoreCLI@2
displayName: 'dotnet build - Tests'
inputs:
projects: '**/test/**/*.csproj'
# workingDirectory: test/Unit
- task: DotNetCoreCLI@2
displayName: 'dotnet test'
inputs:
command: test
projects: '**/test/**/*.csproj'
- phase: Phase_2
displayName: Phase 2 -Linux
condition: succeeded()
queue:
name: Hosted Linux Preview
steps:
- task: DotNetCoreCLI@2
displayName: 'dotnet build - src '
inputs:
projects: '**/src/*.csproj'
arguments: '-c Release'
- task: DotNetCoreCLI@2
displayName: 'dotnet build - Tests'
inputs:
projects: '**/test/**/*.csproj'
- task: DotNetCoreCLI@2
displayName: 'dotnet test'
inputs:
command: test
projects: '**/test/**/*.csproj'
- phase: Phase_3
displayName: Phase 3 - MacOS
condition: succeeded()
queue:
name: Hosted macOS
steps:
- task: DotNetCoreCLI@2
displayName: 'dotnet build - src'
inputs:
projects: '**/src/*.csproj'
arguments: '-c Release'
- task: DotNetCoreCLI@2
displayName: 'dotnet build - Tests'
inputs:
projects: '**/test/**/*.csproj'
- task: DotNetCoreCLI@2
displayName: 'dotnet test'
inputs:
command: test
projects: '**/test/**/*.csproj'
- phase: Phase_4
dependsOn:
- Phase_1
- Phase_2
- Phase_3
displayName: Phase 4 - Nuget
condition: succeeded()
queue:
name: Hosted VS2017
steps:
- task: DotNetCoreCLI@2
displayName: 'dotnet pack'
inputs:
command: pack
arguments: '-c Release'
packagesToPack: src/Hachette.API.SDK.csproj
packDirectory: '$(Build.ArtifactStagingDirectory)/Pack'
versioningScheme: byPrereleaseNumber
majorVersion: 0
minorVersion: 3
# - task: DotNetCoreCLI@2
# displayName: 'dotnet push nuget org'
# inputs:
# command: push
# packagesToPush: '$(Build.ArtifactStagingDirectory)/Pack/*.nupkg'
# nuGetFeedType: external
# publishFeedCredentials: 'AzureDevOps'
- task: NuGetCommand@2
displayName: 'NuGet push'
inputs:
command: push
nuGetFeedType: external
publishFeedCredentials: AzureDevOpsNuget