File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -165,9 +165,6 @@ jobs:
165165 type : releaseJob # This makes a job a release job
166166 isProduction : true # Indicates a production release
167167 steps :
168- - checkout : self
169- fetchDepth : 1
170- fetchTags : false
171168
172169 - template : setup.yml
173170 parameters :
Original file line number Diff line number Diff line change @@ -9,6 +9,20 @@ parameters:
99
1010steps :
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+
1226 - task : npmAuthenticate@0
1327 inputs :
1428 workingFile : .npmrc
You can’t perform that action at this time.
0 commit comments