forked from CommunityToolkit/Microsoft.Toolkit.Win32
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
138 lines (118 loc) · 3.44 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
trigger:
- master
- rel/*
pr:
- master
- rel/*
pool:
vmImage: 'windows-2019'
variables:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
BuildConfiguration: Release
steps:
- task: NuGetToolInstaller@0
displayName: Use NuGet 5.0.0
inputs:
versionSpec: 5.0.0
- task: UseDotNet@2
inputs:
packageType: 'sdk'
useGlobalJson: true
displayName: Use .NET Core sdk
- task: DotNetCoreCLI@2
inputs:
command: custom
custom: tool
arguments: install --tool-path . nbgv
displayName: Install NBGV tool
- script: nbgv cloud
displayName: Set Version
- task: BatchScript@1
inputs:
filename: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\Common7\\Tools\\VsDevCmd.bat"
arguments: -no_logo
modifyEnvironment: true
displayName: Setup Environment Variables
- task: NuGetCommand@2
displayName: NuGet restore Native projects
inputs:
command: restore
configuration: Release
restoreSolution: Microsoft.Toolkit.Win32.UI.XamlApplication\packages.config
restoreDirectory: ../packages/
verbosityRestore: Detailed
- task: NuGetCommand@2
displayName: NuGet restore Managed projects
inputs:
command: restore
configuration: Release
restoreSolution: '**/*.csproj'
- task: NuGetCommand@2
displayName: NuGet restore Managed projects (x86)
inputs:
command: restore
configuration: Release
restoreSolution: '**/*.csproj'
env:
NUGET_RESTORE_MSBUILD_ARGS: /p:Platform=x86
- task: MSBuild@1
displayName: Build x64
inputs:
solution: Microsoft.Toolkit.Win32.sln
platform: x64
configuration: Release
msbuildArguments: /target:Build /bl:$(Agent.TempDirectory)\binlogs\msbuild.release.x64.binlog
restoreNugetPackages: false
- task: MSBuild@1
displayName: Build x86
inputs:
solution: Microsoft.Toolkit.Win32.sln
platform: x86
configuration: Release
msbuildArguments: /target:Build /bl:$(Agent.TempDirectory)\binlogs\msbuild.release.x86.binlog
restoreNugetPackages: false
- task: MSBuild@1
displayName: Build ARM
inputs:
solution: Microsoft.Toolkit.Win32.sln
platform: ARM
configuration: Release
msbuildArguments: /target:Build /bl:$(Agent.TempDirectory)\binlogs\msbuild.release.arm.binlog
restoreNugetPackages: false
- task: MSBuild@1
displayName: Build ARM64
inputs:
solution: Microsoft.Toolkit.Win32.sln
platform: ARM64
configuration: Release
msbuildArguments: /target:Build /bl:$(Agent.TempDirectory)\binlogs\msbuild.release.arm64.binlog
restoreNugetPackages: false
- task: PublishPipelineArtifact@1
displayName: 'Publish binlogs'
condition: Always()
inputs:
targetPath: $(Agent.TempDirectory)\binlogs
artifactName: 'binlogs'
- task: MSBuild@1
displayName: Build Pack
inputs:
solution: Microsoft.Toolkit.Win32.sln
platform: x86
configuration: Release
msbuildArguments: /target:Pack
restoreNugetPackages: false
- task: PowerShell@2
displayName: Authenticode Sign Packages
inputs:
filePath: build/Sign-Package.ps1
env:
SignClientUser: $(SignClientUser)
SignClientSecret: $(SignClientSecret)
ArtifactDirectory: bin\nupkg
condition: and(succeeded(), not(eq(variables['build.reason'], 'PullRequest')), not(eq(variables['SignClientSecret'], '')), not(eq(variables['SignClientUser'], '')))
- task: PublishBuildArtifacts@1
displayName: Publish Package Artifacts
inputs:
pathToPublish: .\bin\nupkg
artifactType: container
artifactName: Packages