diff --git a/pipelines/ci-build.yml b/pipelines/ci-build.yml index c95744f5b32..a1c15f0d738 100644 --- a/pipelines/ci-build.yml +++ b/pipelines/ci-build.yml @@ -61,11 +61,27 @@ extends: inputs: packageType: sdk version: 6.x + - task: NuGetAuthenticate@1 + displayName: 'Authenticate to Azure Artifacts' + + - pwsh: | + @" + + + + + + + + "@ | Set-Content -Path "$(Build.SourcesDirectory)/nuget.config" -Encoding UTF8 + displayName: 'Create nuget.config (central feed)' - task: DotNetCoreCLI@2 displayName: 'dotnet restore' inputs: command: restore projects: '**/*.csproj' + feedsToUse: "config" + nugetConfigPath: "$(Build.SourcesDirectory)/nuget.config" - task: PowerShell@2 displayName: 'Validate updated version' condition: and(contains(variables['build.sourceBranch'], 'refs/heads/main'), succeeded())