-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement pipeline to publish TFX CLI automatically (#435)
- Loading branch information
1 parent
59d2330
commit e247d17
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
trigger: | ||
- master | ||
|
||
pool: | ||
vmImage: windows-latest | ||
|
||
variables: | ||
- group: npm-tokens | ||
|
||
steps: | ||
- checkout: self | ||
clean: true | ||
|
||
- task: NodeTool@0 | ||
displayName: Use node 10 | ||
inputs: | ||
versionSpec: "10.x" | ||
|
||
- script: npm i -g npm@6.14.12 --force | ||
displayName: Use npm version 6.14.12 | ||
|
||
- script: npm ci | ||
displayName: Install npm-dependencies | ||
|
||
- script: npm run build | ||
displayName: Build TFX CLI | ||
|
||
- powershell: | | ||
"//registry.npmjs.org/:_authToken=$env:NPM_TOKEN" | Out-File ".npmrc" | ||
& npm publish --ignore-scripts _build | ||
if ($LASTEXITCODE -eq 1) { | ||
Write-Host "##vso[task.logissue type=warning]Publishing TFX CLI was unsuccessful" | ||
exit 0 | ||
} | ||
env: | ||
NPM_TOKEN: $(npm-automation.token) | ||
displayName: Publish TFX CLI |