84 строки
2.0 KiB
YAML
84 строки
2.0 KiB
YAML
|
|
trigger:
|
|
- master
|
|
- rel/*
|
|
|
|
pr:
|
|
- master
|
|
- rel/*
|
|
|
|
pool:
|
|
vmImage: windows-2019
|
|
|
|
variables:
|
|
BuildConfiguration: Lottie-Windows
|
|
|
|
steps:
|
|
# Set up a VS build environment.
|
|
- task: BatchScript@1
|
|
displayName: Setup Environment Variables
|
|
inputs:
|
|
filename: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\Common7\\Tools\\VsDevCmd.bat"
|
|
arguments: -no_logo
|
|
modifyEnvironment: true
|
|
|
|
# Install NuGet tools.
|
|
- task: NuGetToolInstaller@1
|
|
displayName: Use NuGet 5.8.1
|
|
inputs:
|
|
versionSpec: 5.8.1
|
|
|
|
# Install Nerbank.GitVersioning.
|
|
- task: DotNetCoreCLI@2
|
|
displayName: Install NBGV tool
|
|
inputs:
|
|
command: custom
|
|
custom: tool
|
|
arguments: install --tool-path . nbgv
|
|
|
|
# .NET Core SDK Installer.
|
|
# 2.2.x is needed to build the UWP code.
|
|
# 5.0.x is used for everything else that the UWP apps don't depend on.
|
|
- task: UseDotNet@2
|
|
inputs:
|
|
packageType: 'sdk' # Options: runtime, sdk
|
|
version: '2.2.x'
|
|
|
|
- task: UseDotNet@2
|
|
inputs:
|
|
packageType: 'sdk' # Options: runtime, sdk
|
|
version: '5.0.x'
|
|
|
|
# Nerdbank.GitVersioning
|
|
- script: nbgv cloud
|
|
displayName: Set Version
|
|
|
|
# Install the Windows SDK. Version 18362 (Windows 1909 release).
|
|
# This is needed to build the UWP code.
|
|
- powershell: .\build\Install-WindowsSdkISO.ps1 18362
|
|
displayName: Insider SDK
|
|
|
|
# Run the build.
|
|
- powershell: .\build.ps1 -target=Package
|
|
displayName: Build
|
|
workingDirectory: .\build
|
|
|
|
# Sign the result of the build.
|
|
- 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'], '')))
|
|
|
|
# Publish the results of the build.
|
|
- task: PublishBuildArtifacts@1
|
|
displayName: Publish Package Artifacts
|
|
inputs:
|
|
pathToPublish: .\bin\nupkg
|
|
artifactType: container
|
|
artifactName: Packages
|