-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.yml
87 lines (77 loc) · 2.54 KB
/
config.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
trigger:
branches:
include:
- 'master'
tags:
include:
- '*'
variables:
- template: 'templates/vars.yml'
stages:
- stage: 'Test1'
displayName: 'Test on Linux'
dependsOn: []
jobs:
- template: 'templates/test-on-platform.yml'
parameters:
imageName: '${{ variables.imageNameLinux }}'
- stage: 'Test2'
displayName: 'Test on macOS'
dependsOn: []
jobs:
- template: 'templates/test-on-platform.yml'
parameters:
imageName: '${{ variables.imageNameMac }}'
- stage: 'Test3'
displayName: 'Test on Windows'
dependsOn: []
jobs:
- template: 'templates/test-on-platform.yml'
parameters:
imageName: '${{ variables.imageNameWindows }}'
- stage: 'Deploy'
dependsOn:
- 'Test1'
- 'Test2'
- 'Test3'
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
jobs:
- job: 'DeployGitHub'
displayName: 'Create GitHub release'
pool:
vmImage: '${{ variables.imageNameLinux }}'
steps:
# Install dependencies.
- template: 'templates/install-deps.yml'
parameters:
nodeVersion: '${{ variables.nodeVersionLatest }}'
# Package extension
- script: 'npm run vsce-package'
displayName: 'Package extension'
# Create Github release.
- task: 'GitHubRelease@1'
displayName: 'Create GitHub release'
inputs:
action: 'create'
repositoryName: '$(Build.Repository.Name)'
target: '$(Build.SourceVersion)'
tagSource: 'gitTag'
assets: '$(System.DefaultWorkingDirectory)/*.vsix'
changeLogType: 'commitBased'
changeLogCompareToRelease: 'lastNonDraftRelease'
gitHubConnection: 'github.com_gkalpak'
- job: 'DeployMarketplace'
displayName: 'Publish to marketplace'
pool:
vmImage: '${{ variables.imageNameLinux }}'
steps:
# Install dependencies.
- template: 'templates/install-deps.yml'
parameters:
nodeVersion: '${{ variables.nodeVersionLatest }}'
# Publish to marketplace.
# WARNING: Using `--silent` to prevent npm from logging the value of `$VSCE_ACCESS_TOKEN`.
- script: 'npm run vsce-publish --silent -- --pat $VSCE_ACCESS_TOKEN'
displayName: 'Publish to marketplace'
env:
VSCE_ACCESS_TOKEN: '$(VSCE_ACCESS_TOKEN)'