-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
azure-pipelines.yml
161 lines (146 loc) · 4.08 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
trigger:
batch: true
branches:
include:
- master
paths:
exclude:
- README.md
- .editorconfig
- .gitignore
- LICENSE
- mkdocs.yml
- docs/*
- theme/*
pr:
branches:
include:
- master
paths:
exclude:
- README.md
- .editorconfig
- .gitignore
- LICENSE
- mkdocs.yml
- docs/*
- theme/*
name: $(Build.BuildId)
variables:
- name: VMImage
value: 'windows-latest'
- name: BuildConfiguration
value: Release
- group: 'Code Signing'
stages:
- stage: build
displayName: Build NuGet Packages
jobs:
- job: buildJob
displayName: Build Container Extensions
pool:
vmImage: $(VMImage)
demands:
- MSBuild
- Xamarin.Android
- JDK
- AndroidSDK
steps:
- checkout: self
clean: true
lfs: true
submodules: true
- task: UseDotNet@2
inputs:
packageType: 'sdk'
useGlobalJson: true
- task: NuGetToolInstaller@1
displayName: Install Latest NuGet
inputs:
checkLatest: true
- task: MSBuild@1
displayName: Build Projects
inputs:
solution: Prism.Container.Extensions.sln
configuration: $(BuildConfiguration)
msbuildArguments: '/p:DebugType=portable /p:JavaSdkDirectory="$(JAVA_HOME)" /restore'
- task: DotNetCoreCLI@2
displayName: Run Unit Tests
inputs:
command: 'test'
projects: |
tests\Prism.DryIoc.*\*.csproj
tests\Prism.Microsoft.DependencyInjection.*\*.csproj
tests\Prism.Unity.*\*.csproj
tests\Shiny.Prism.Tests\*.csproj
arguments: '--no-build --collect "Code Coverage" -c $(BuildConfiguration)'
- powershell: ./Sign-Packages.ps1
workingDirectory: build
displayName: Authenticode Sign Artifacts
env:
SignClientUser: $(SignClientUser)
SignClientSecret: $(SignClientSecret)
SignClientClientId: $(SignClientClientId)
SignClientTenantId: $(SignClientTenantId)
SignServiceResourceId: $(SignServiceResourceId)
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false))
- task: PublishPipelineArtifact@1
displayName: Publish Artifacts
inputs:
artifactName: NuGet
targetPath: $(Build.ArtifactStagingDirectory)
- stage: deploy
displayName: Deploy NuGets
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
jobs:
- deployment: SponsorConnect
displayName: SponsorConnect.dev
environment: SponsorConnect
strategy:
runOnce:
deploy:
steps:
- task: NuGetCommand@2
displayName: NuGet Push
inputs:
command: push
packagesToPush: '$(Pipeline.Workspace)/**/*.nupkg;$(Pipeline.Workspace)/**/*.snupkg'
nuGetFeedType: external
publishFeedCredentials: 'SponsorConnect'
- stage: deployNuGetOrg
displayName: Deploy NuGets
dependsOn: deploy
jobs:
- deployment: NuGet
displayName: NuGet.org
environment: NuGet
strategy:
runOnce:
deploy:
steps:
- checkout: self
clean: false
- powershell: ./Process-Release.ps1
name: processName
displayName: Process Artifacts for Release
workingDirectory: build
env:
searchDirectory: $(Pipeline.Workspace)/NuGet
- task: GithubRelease@0
displayName: 'Create GitHub Release'
inputs:
gitHubConnection: GitHub
title: '$(ReleaseDisplayName)'
tagSource: manual
tag: 'v$(VersionName)'
isPreRelease: $(IS_PREVIEW)
assets: '$(Pipeline.Workspace)/**/*.nupkg'
addChangeLog: true
isDraft: true
- task: NuGetCommand@2
displayName: NuGet Push
inputs:
command: push
packagesToPush: '$(Pipeline.Workspace)/**/*.nupkg;$(Pipeline.Workspace)/**/*.snupkg'
nuGetFeedType: external
publishFeedCredentials: 'NuGet'