forked from CommunityToolkit/WindowsCommunityToolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
86 lines (70 loc) · 2.04 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
trigger:
- master
- rel/*
pr:
- master
- rel/*
pool:
vmImage: windows-2019
variables:
BuildConfiguration: Release
steps:
- 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: NuGetToolInstaller@0
displayName: Use NuGet 5.0.0
inputs:
versionSpec: 5.0.0
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '2.1.202' # This SDK contains .Net Core 2.0.9, which we still need to run some of our .Net Core Tests
performMultiLevelLookup: true
displayName: Use .NET Core sdk 2
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '3.1.200'
performMultiLevelLookup: true
displayName: Use .NET Core sdk 3
- task: DotNetCoreCLI@2
inputs:
command: custom
custom: tool
arguments: install --tool-path . nbgv
displayName: Install NBGV tool
- script: nbgv cloud
displayName: Set Version
#- powershell: .\build\Install-WindowsSdkISO.ps1 17763
# displayName: Insider SDK
- powershell: .\build\build.ps1 -target=Build
displayName: Build
- powershell: .\build\build.ps1 -target=Test
displayName: Test
- powershell: .\build\build.ps1 -target=Package
displayName: Package
- task: PublishTestResults@2
inputs:
testResultsFormat: 'VSTest'
testResultsFiles: '**/VsTestResults*.trx'
displayName: Publish Test Results
condition: succeededOrFailed()
- 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