Skip to content

Commit f9a75ff

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 1afccdf commit f9a75ff

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:
@@ -437,6 +441,8 @@ extends:
437441
artifactName: '${{ dim.runtime }}'
438442
steps:
439443
- checkout: self
444+
- task: NuGetAuthenticate@1
445+
displayName: 'Authenticate to NuGet feeds'
440446
- task: UseDotNet@2
441447
displayName: 'Use .NET 10 SDK'
442448
inputs:
@@ -524,6 +530,8 @@ extends:
524530
artifactName: 'dotnet-tool'
525531
steps:
526532
- checkout: self
533+
- task: NuGetAuthenticate@1
534+
displayName: 'Authenticate to NuGet feeds'
527535
- task: UseDotNet@2
528536
displayName: 'Use .NET 10 SDK'
529537
inputs:

0 commit comments

Comments
 (0)