Microsoft.Toolkit.Win32/azure-pipelines.yml

158 строки
3.8 KiB
YAML

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'
version: '3.0.100'
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
- powershell: .\build\Install-WindowsSdkISO.ps1 18362
displayName: Insider SDK
- 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
#- powershell: .\build\build.ps1 -target=Package
# displayName: Build
- 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 # Options: quiet, normal, detaile
- task: MSBuild@1
displayName: Build x64 Restore
inputs:
solution: Microsoft.Toolkit.Win32.sln
platform: x64
configuration: Release
msbuildArguments: /target:Restore
restoreNugetPackages: false # Optional
- task: MSBuild@1
displayName: Build x64
inputs:
solution: Microsoft.Toolkit.Win32.sln
platform: x64
configuration: Release
msbuildArguments: /target:Build
restoreNugetPackages: false # Optional
- task: MSBuild@1
displayName: Build x86 Restore
inputs:
solution: Microsoft.Toolkit.Win32.sln
platform: x86
configuration: Release
msbuildArguments: /target:Restore
restoreNugetPackages: false # Optional
- task: MSBuild@1
displayName: Build x86
inputs:
solution: Microsoft.Toolkit.Win32.sln
platform: x86
configuration: Release
msbuildArguments: /target:Build
restoreNugetPackages: false # Optional
- task: MSBuild@1
displayName: Build ARM Restore
inputs:
solution: Microsoft.Toolkit.Win32.sln
platform: ARM
configuration: Release
msbuildArguments: /target:Restore
restoreNugetPackages: false # Optional
- task: MSBuild@1
displayName: Build ARM
inputs:
solution: Microsoft.Toolkit.Win32.sln
platform: ARM
configuration: Release
msbuildArguments: /target:Build
restoreNugetPackages: false # Optional
- task: MSBuild@1
displayName: Build ARM64 Restore
inputs:
solution: Microsoft.Toolkit.Win32.sln
platform: ARM64
configuration: Release
msbuildArguments: /target:Restore
restoreNugetPackages: false # Optional
- task: MSBuild@1
displayName: Build ARM64
inputs:
solution: Microsoft.Toolkit.Win32.sln
platform: ARM64
configuration: Release
msbuildArguments: /target:Build
restoreNugetPackages: false # Optional
- task: MSBuild@1
displayName: Build Pack
inputs:
solution: Microsoft.Toolkit.Win32.sln
platform: x86
configuration: Release
msbuildArguments: /target:Pack
restoreNugetPackages: false # Optional
- 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