From e247d175f4809556ffdf01769f0c7aaff0e50be3 Mon Sep 17 00:00:00 2001 From: Sergey Koryshev Date: Mon, 29 May 2023 16:39:29 +0200 Subject: [PATCH] Implement pipeline to publish TFX CLI automatically (#435) --- .azure-pipelines/azure-pipeline.yml | 37 +++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .azure-pipelines/azure-pipeline.yml diff --git a/.azure-pipelines/azure-pipeline.yml b/.azure-pipelines/azure-pipeline.yml new file mode 100644 index 00000000..633111b9 --- /dev/null +++ b/.azure-pipelines/azure-pipeline.yml @@ -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 \ No newline at end of file