Skip to content

Commit 6a83662

Browse files
committed
ci: authenticate to NuGet feeds before restore
The build jobs restore packages from an authenticated Azure Artifacts feed, which requires the Azure Artifacts credential provider to be primed first. Without it the restore falls back to anonymous access and fails on a private feed. Run NuGetAuthenticate once at the start of each job that restores (Windows, macOS, Linux, and the .NET tool packaging job) so every subsequent dotnet restore/publish is authenticated. The release-stage NuGet publish job is unaffected: it pushes via the 1ES service connection rather than a restore. Assisted-by: Claude Opus 4.8 Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
1 parent 0df30be commit 6a83662

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.azure-pipelines/release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ extends:
134134
artifactName: '${{ dim.runtime }}'
135135
steps:
136136
- checkout: self
137+
- task: NuGetAuthenticate@1
138+
displayName: 'Authenticate to NuGet feeds'
137139
- task: PowerShell@2
138140
displayName: 'Install .NET 10 SDK'
139141
inputs:
@@ -282,6 +284,8 @@ extends:
282284
artifactName: '${{ dim.runtime }}'
283285
steps:
284286
- checkout: self
287+
- task: NuGetAuthenticate@1
288+
displayName: 'Authenticate to NuGet feeds'
285289
- task: UseDotNet@2
286290
displayName: 'Use .NET 10 SDK'
287291
inputs:
@@ -430,6 +434,8 @@ extends:
430434
artifactName: '${{ dim.runtime }}'
431435
steps:
432436
- checkout: self
437+
- task: NuGetAuthenticate@1
438+
displayName: 'Authenticate to NuGet feeds'
433439
- task: UseDotNet@2
434440
displayName: 'Use .NET 10 SDK'
435441
inputs:
@@ -510,6 +516,8 @@ extends:
510516
artifactName: 'dotnet-tool'
511517
steps:
512518
- checkout: self
519+
- task: NuGetAuthenticate@1
520+
displayName: 'Authenticate to NuGet feeds'
513521
- task: UseDotNet@2
514522
displayName: 'Use .NET 10 SDK'
515523
inputs:

0 commit comments

Comments
 (0)