-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathazure-pipelines.yml
68 lines (55 loc) · 2.28 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
trigger:
- main
- rel/*
pr:
- main
- rel/*
pool:
vmImage: windows-2022
variables:
BuildConfiguration: Release
steps:
- task: BatchScript@1
inputs:
filename: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\Common7\\Tools\\VsDevCmd.bat"
arguments: -no_logo
modifyEnvironment: true
displayName: Setup Environment Variables
- task: NuGetToolInstaller@1
displayName: Use NuGet 5.11.x
inputs:
versionSpec: 5.11.x
- task: DotNetCoreCLI@2
inputs:
command: custom
custom: tool
arguments: install --tool-path . nbgv
displayName: Install NBGV tool
- script: nbgv cloud
displayName: Set Version
- task: UseDotNet@2
displayName: 'Install .NET SDK'
inputs:
version: 6.0.400
performMultiLevelLookup: true
# Workaround for VS2022 in CI Builds
- bash: dotnet tool update -g dotnet-vs
- bash: vs modify --rel -sku:enterprise --quiet +Microsoft.Component.MSBuild +Microsoft.VisualStudio.Component.ManagedDesktop.Core +Microsoft.NetCore.Component.DevelopmentTools +Microsoft.VisualStudio.Workload.UniversalBuildTools +Microsoft.VisualStudio.ComponentGroup.UWP.BuildTools +Microsoft.VisualStudio.Workload.MSBuildTools +Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools +Microsoft.VisualStudio.Component.Windows10SDK +Microsoft.VisualStudio.Component.Windows10SDK.18362 +Microsoft.VisualStudio.Component.Windows10SDK.19041 +Microsoft.VisualStudio.Component.Windows10SDK.20348 +Microsoft.VisualStudio.Component.Windows10SDK.22000 +Microsoft.VisualStudio.Workload.Universal
- powershell: .\build\Install-WindowsSdkISO.ps1 18362
- script: msbuild -p:Configuration=Release -r -t:pack -p:GenerateLibraryLayout=true -p:PackageOutputPath=..\build\nupkg .\ColorCode.sln
displayName: Build and pack
- task: PowerShell@2
displayName: Authenticode Sign Packages
inputs:
filePath: build/Sign-Package.ps1
env:
SignClientUser: $(SignClientUser)
SignClientSecret: $(SignClientSecret)
ArtifactDirectory: build\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: 'build\nupkg'
artifactType: container
artifactName: Packages