2019-06-20 10:30:23 +02:00
|
|
|
trigger:
|
|
|
|
branches:
|
|
|
|
include: ['*']
|
|
|
|
tags:
|
|
|
|
include: ['*']
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- task: NodeTool@0
|
|
|
|
inputs:
|
2019-06-20 11:23:41 +02:00
|
|
|
versionSpec: "8.x"
|
2019-06-20 10:30:23 +02:00
|
|
|
|
|
|
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
|
|
|
inputs:
|
2019-06-20 11:23:41 +02:00
|
|
|
versionSpec: "1.x"
|
2019-06-20 10:30:23 +02:00
|
|
|
|
|
|
|
- script: yarn
|
|
|
|
displayName: Install Dependencies
|
|
|
|
|
|
|
|
- script: yarn compile
|
|
|
|
displayName: Compile
|
|
|
|
|
|
|
|
- script: yarn test
|
2019-06-20 10:57:18 +02:00
|
|
|
displayName: Run Tests
|
|
|
|
|
|
|
|
- task: Npm@1
|
|
|
|
displayName: 'Publish to NPM'
|
|
|
|
inputs:
|
|
|
|
command: publish
|
|
|
|
verbose: false
|
|
|
|
publishEndpoint: 'NPM'
|
|
|
|
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
|