mirror of
https://github.com/microsoft/vscode.git
synced 2026-08-17 04:15:47 +01:00
fix(ci): publish stage requires auth (#326014)
This commit is contained in:
@@ -54,6 +54,23 @@ jobs:
|
||||
- pwsh: Write-Host "##vso[build.addbuildtag]🚀"
|
||||
displayName: Add build tag
|
||||
|
||||
- pwsh: |
|
||||
$ErrorActionPreference = 'Stop'
|
||||
# Set the private NPM registry to the global npmrc file
|
||||
# so that authentication works for subfolders like build/, remote/, extensions/ etc
|
||||
# which does not have their own .npmrc file
|
||||
npm config set registry "$env:NPM_REGISTRY"
|
||||
$NpmrcPath = (npm config get userconfig)
|
||||
Write-Host "##vso[task.setvariable variable=NPMRC_PATH]$NpmrcPath"
|
||||
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM
|
||||
|
||||
- task: npmAuthenticate@0
|
||||
inputs:
|
||||
workingFile: $(NPMRC_PATH)
|
||||
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
displayName: Setup NPM Authentication
|
||||
|
||||
- pwsh: |
|
||||
npm ci
|
||||
workingDirectory: build
|
||||
|
||||
Reference in New Issue
Block a user