Skip to content

Commit

Permalink
Implement pipeline to publish TFX CLI automatically (#435)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergey-koryshev authored May 29, 2023
1 parent 59d2330 commit e247d17
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .azure-pipelines/azure-pipeline.yml
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

0 comments on commit e247d17

Please sign in to comment.