diff --git a/tools/devops/automation/templates/release/publish-nugets.yml b/tools/devops/automation/templates/release/publish-nugets.yml index 689f6262ae99..e7f792504b2b 100644 --- a/tools/devops/automation/templates/release/publish-nugets.yml +++ b/tools/devops/automation/templates/release/publish-nugets.yml @@ -18,11 +18,11 @@ steps: ${{ else }}: VAR_NAME: 'NUGET_PRIVATE_FEED' -- task: NuGetAuthenticate@0 - displayName: 'Authenticate dotnet-tool feed' - inputs: - nuGetServiceConnections: $(ConfigureNuget.Credential) - condition: contains (variables['Build.DefinitionName'], 'private') +- ${{ if not(contains(variables['Build.DefinitionName'], 'private')) }}: + - task: NuGetAuthenticate@0 + displayName: 'Authenticate dotnet-tool feed' + inputs: + nuGetServiceConnections: $(ConfigureNuget.Credential) - task: DownloadPipelineArtifact@2 inputs: