diff --git a/eng/common/pipelines/templates/steps/create-authenticated-npmrc.yml b/eng/common/pipelines/templates/steps/create-authenticated-npmrc.yml index 52379684c4ea..cb29d1312ebd 100644 --- a/eng/common/pipelines/templates/steps/create-authenticated-npmrc.yml +++ b/eng/common/pipelines/templates/steps/create-authenticated-npmrc.yml @@ -6,6 +6,9 @@ parameters: - name: CustomCondition type: string default: succeeded() + - name: ServiceConnection + type: string + default: '' steps: - pwsh: | @@ -21,8 +24,10 @@ steps: $content | Out-File '${{ parameters.npmrcPath }}' displayName: 'Create .npmrc' condition: ${{ parameters.CustomCondition }} + - task: npmAuthenticate@0 displayName: Authenticate .npmrc condition: ${{ parameters.CustomCondition }} inputs: workingFile: ${{ parameters.npmrcPath }} + azureDevOpsServiceConnection: ${{ parameters.ServiceConnection }}