67 lines
2.2 KiB
YAML
67 lines
2.2 KiB
YAML
# From our friends at MUX: https://github.com/microsoft/microsoft-ui-xaml/blob/main/build/AzurePipelinesTemplates/MUX-BuildAndPublishPGONuGet-Job.yml
|
|
|
|
parameters:
|
|
dependsOn: ''
|
|
pgoArtifact: PGO
|
|
|
|
jobs:
|
|
- job: BuildAndPublishPGONuGet
|
|
dependsOn: ${{ parameters.dependsOn }}
|
|
pool:
|
|
vmImage: 'windows-2019'
|
|
variables:
|
|
artifactsPath: $(Build.SourcesDirectory)\Artifacts
|
|
pgoToolsPath: $(Build.SourcesDirectory)\build\PGO
|
|
nuspecPath: $(pgoToolsPath)\NuSpecs
|
|
nuspecFilename: PGO.nuspec
|
|
|
|
steps:
|
|
- task: DownloadBuildArtifacts@0
|
|
inputs:
|
|
artifactName: ${{ parameters.pgoArtifact }}
|
|
downloadPath: $(artifactsPath)
|
|
|
|
- task: NuGetAuthenticate@0
|
|
inputs:
|
|
nuGetServiceConnections: 'Terminal Public Artifact Feed'
|
|
|
|
- task: NuGetToolInstaller@0
|
|
displayName: 'Use NuGet 5.8.0'
|
|
inputs:
|
|
versionSpec: 5.8.0
|
|
|
|
# In the Microsoft Azure DevOps tenant, NuGetCommand is ambiguous.
|
|
# This should be `task: NuGetCommand@2`
|
|
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
|
|
displayName: Restore NuGet packages for extraneous build actions
|
|
inputs:
|
|
command: restore
|
|
feedsToUse: config
|
|
configPath: NuGet.config
|
|
restoreSolution: build/packages.config
|
|
restoreDirectory: '$(Build.SourcesDirectory)\packages'
|
|
|
|
- task: MSBuild@1
|
|
displayName: 'Create PGO Nuget'
|
|
inputs:
|
|
solution: $(pgoToolsPath)\PGO.DB.proj
|
|
msbuildArguments: '/t:CreatePGONuGet /p:PGDPathForAllArch=$(artifactsPath)\${{ parameters.pgoArtifact }} /p:PGOOutputPath=$(Build.ArtifactStagingDirectory)'
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
inputs:
|
|
pathToPublish: $(Build.ArtifactStagingDirectory)
|
|
artifactName: ${{ parameters.pgoArtifact }}
|
|
|
|
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
|
|
displayName: 'NuGet push'
|
|
inputs:
|
|
command: push
|
|
nuGetFeedType: external
|
|
packagesToPush: $(Build.ArtifactStagingDirectory)/*.nupkg
|
|
# The actual URL and PAT for this feed is configured at
|
|
# https://microsoft.visualstudio.com/Dart/_settings/adminservices
|
|
# This is the name of that connection
|
|
publishFeedCredentials: 'Terminal Public Artifact Feed'
|
|
feedsToUse: config
|
|
nugetConfigPath: '$(Build.SourcesDirectory)/NuGet.config'
|