Skip to content

Commit 0abc798

Browse files
committed
Fix NPM publishing (hopefully)
1 parent 4f10374 commit 0abc798

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

azure-pipelines/release.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,16 @@ stages:
8888
displayName: Download deployables artifact
8989
patterns: '**/*.tgz'
9090
- powershell: |
91-
$tgz = (Get-ChildItem *.tgz)[0].Name
92-
Write-Output ("##vso[task.setvariable variable=TgzPath;]$tgz")
93-
Set-Content -Path .npmrc -Value ""
94-
workingDirectory: $(Pipeline.Workspace)/CI/deployables
91+
$tgz = (Get-ChildItem "$(Pipeline.Workspace)/CI/deployables/*.tgz")[0].FullName
92+
93+
npm init -y
94+
npm install $tgz
95+
workingDirectory: $(Agent.TempDirectory)
9596
displayName: Prepare to publish NPM package
96-
- task: npmAuthenticate@0
97-
inputs:
98-
workingFile: $(Pipeline.Workspace)/CI/deployables/.npmrc
99-
customEndpoint: npmjs.org
100-
- powershell: npm publish $(TgzPath)
97+
- task: Npm@1
10198
displayName: npm publish
102-
workingDirectory: $(Pipeline.Workspace)/CI/deployables
99+
inputs:
100+
command: publish
101+
workingDir: $(Agent.TempDirectory)/node_modules/nerdbank-gitversioning
102+
verbose: false
103+
publishEndpoint: npmjs.org

0 commit comments

Comments
 (0)