Skip to content

Commit 6aba4d2

Browse files
committed
Try to get around .npmrc not being overridden
1 parent f0c478d commit 6aba4d2

File tree

3 files changed

+4
-22
lines changed

3 files changed

+4
-22
lines changed

build/templates/publish-extension.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,6 @@ jobs:
165165
type: releaseJob # This makes a job a release job
166166
isProduction: true # Indicates a production release
167167
steps:
168-
- template: setup.yml
169-
parameters:
170-
installNode: true
171-
installPython: false
172168

173169
- task: 1ES.DownloadPipelineArtifact@1
174170
inputs:

build/templates/publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,12 @@ steps:
102102
103103
if ('${{ parameters.preRelease }}' -eq 'True') {
104104
Write-Host 'Publishing as pre-release'
105-
Write-Host "Executing: npx vsce publish --pat *** --packagePath $vsixPath --manifestPath $manifestPath --signaturePath $signaturePath --pre-release"
106-
npx vsce publish --pat $aadToken --packagePath $vsixPath --manifestPath $manifestPath --signaturePath $signaturePath --pre-release
105+
Write-Host "Executing: npx @vscode/vsce@latest publish --pat *** --packagePath $vsixPath --manifestPath $manifestPath --signaturePath $signaturePath --pre-release"
106+
npx @vscode/vsce@latest publish --pat $aadToken --packagePath $vsixPath --manifestPath $manifestPath --signaturePath $signaturePath --pre-release
107107
} else {
108108
Write-Host 'Publishing as stable release'
109-
Write-Host "Executing: npx vsce publish --pat *** --packagePath $vsixPath --manifestPath $manifestPath --signaturePath $signaturePath"
110-
npx vsce publish --pat $aadToken --packagePath $vsixPath --manifestPath $manifestPath --signaturePath $signaturePath
109+
Write-Host "Executing: npx @vscode/vsce@latest publish --pat *** --packagePath $vsixPath --manifestPath $manifestPath --signaturePath $signaturePath"
110+
npx @vscode/vsce@latest publish --pat $aadToken --packagePath $vsixPath --manifestPath $manifestPath --signaturePath $signaturePath
111111
}
112112
113113
if ($LASTEXITCODE -ne 0) {

build/templates/setup.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,6 @@ parameters:
99

1010
steps:
1111
- ${{ if eq(parameters.installNode, true) }}:
12-
- pwsh: |
13-
if (-not (Test-Path '.npmrc')) {
14-
Write-Host 'No .npmrc found, creating one with public npm registry'
15-
@"
16-
# Force public npm registry to avoid CI auth (E401) when no token is provided
17-
registry=https://registry.npmjs.org/
18-
# Do not require auth for public installs
19-
always-auth=false
20-
"@ | Out-File -FilePath '.npmrc' -Encoding utf8
21-
} else {
22-
Write-Host '.npmrc already exists'
23-
}
24-
displayName: Ensure .npmrc exists
25-
2612
- task: npmAuthenticate@0
2713
inputs:
2814
workingFile: .npmrc

0 commit comments

Comments
 (0)