-
Notifications
You must be signed in to change notification settings - Fork 80
/
azure-pipelines.yml
48 lines (42 loc) · 1012 Bytes
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
trigger:
- master
- release/*
- beta/*
pool:
vmImage: 'ubuntu-latest'
steps:
- task: Npm@1
displayName: 'npm install'
inputs:
verbose: false
- task: Npm@1
displayName: 'npm run test'
continueOnError: true
inputs:
command: custom
verbose: false
customCommand: 'run test'
- task: Npm@1
displayName: 'npm run build'
inputs:
command: custom
verbose: false
customCommand: 'run build'
- task: Npm@1
displayName: 'npm publish beta (conditionally)'
inputs:
command: custom
verbose: false
customCommand: 'publish --tag beta'
publishEndpoint: npm
customEndpoint: npm
continueOnError: true
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/heads/beta'))
- task: Npm@1
displayName: 'npm publish release (conditionally)'
inputs:
command: publish
verbose: false
publishEndpoint: npm
customEndpoint: npm
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/heads/release'))