This commit is contained in:
Jose Manuel Heredia Hidalgo 2021-03-23 12:41:16 -07:00
Родитель 8307579dd8
Коммит 19ca28f818
1 изменённых файлов: 25 добавлений и 26 удалений

Просмотреть файл

@ -62,29 +62,28 @@ stages:
command: custom
verbose: false
customCommand: install
- ${{if and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'internal'))}}:
- stage: Release
dependsOn: BuildStage
jobs:
- deployment: PublishToNpm
variables:
TAR_NAME: $[ stageDependencies.BuildStage.Build.outputs['PackArtifacts.TAR_NAME'] ]
pool:
vmImage: "Ubuntu 16.04"
environment: npm
displayName: Publish to NPM
strategy:
runOnce:
deploy:
steps:
- task: NodeTool@0
inputs:
versionSpec: "14.x"
displayName: "Install Node.js"
- script: |
cd $(Pipeline.Workspace)/packages
npm config set //registry.npmjs.org/:_authToken=$(azure-sdk-npm-token)
npm publish $(TAR_NAME) --access public
npm config delete //registry.npmjs.org/:_authToken
displayName: "Publish to NPM"
- ? ${{if and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'internal'))}}
: - stage: Release
dependsOn: BuildStage
jobs:
- deployment: PublishToNpm
variables:
TAR_NAME: $[ stageDependencies.BuildStage.Build.outputs['PackArtifacts.TAR_NAME'] ]
pool:
vmImage: "Ubuntu 16.04"
environment: npm
displayName: Publish to NPM
strategy:
runOnce:
deploy:
steps:
- task: NodeTool@0
inputs:
versionSpec: "14.x"
displayName: "Install Node.js"
- script: |
cd $(Pipeline.Workspace)/packages
npm config set //registry.npmjs.org/:_authToken=$(azure-sdk-npm-token)
npm publish $(TAR_NAME) --access public
npm config delete //registry.npmjs.org/:_authToken
displayName: "Publish to NPM"