forked from microsoft/azure-pipelines-task-lib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
67 lines (56 loc) · 1.75 KB
/
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
trigger:
- master
- features/*
- releases/*
variables:
- group: npm-tokens
- name: nodeVersion
value: '16.13.0'
jobs:
#################################################
- job: windows
#################################################
displayName: windows
pool:
vmImage: windows-2019
steps:
- template: azure-pipelines-steps-node.yml
parameters:
nodeVersion: $(nodeVersion)
- template: azure-pipelines-steps-test-build.yml
#################################################
- job: linux
#################################################
displayName: Linux
pool:
vmImage: ubuntu-18.04
steps:
- template: azure-pipelines-steps-node.yml
parameters:
nodeVersion: $(nodeVersion)
- template: azure-pipelines-steps-test-build.yml
- task: PublishPipelineArtifact@1
inputs:
targetPath: 'node/_build'
artifactType: 'pipeline'
artifactName: 'npm-package'
# For CI runs on master, automatically publish packages
- bash: |
echo //registry.npmjs.org/:_authToken=\${NPM_TOKEN} > .npmrc
npm publish || true # Ignore publish failures, usually will happen because package already exists
displayName: npm publish
workingDirectory: node/_build
condition: and(succeeded(), in(variables['build.reason'], 'IndividualCI', 'BatchedCI', 'Manual'), in(variables['build.sourcebranch'], 'refs/heads/master'))
env:
NPM_TOKEN: $(npm-automation.token)
#################################################
- job: macOS
#################################################
displayName: macOS
pool:
vmImage: macOS-10.15
steps:
- template: azure-pipelines-steps-node.yml
parameters:
nodeVersion: $(nodeVersion)
- template: azure-pipelines-steps-test-build.yml