-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathazure-ci.yml
56 lines (53 loc) · 1.32 KB
/
azure-ci.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
variables:
isMasterBranch: $[eq(variables['Build.SourceBranch'], 'refs/heads/master')]
isReleaseBranch: $[startsWith(variables['Build.SourceBranch'], 'refs/heads/release/')]
pool:
vmImage: 'ubuntu-latest'
trigger:
batch: false
branches:
include:
- master
- release/*
paths:
include:
- '*'
exclude:
- 'readme.md'
- 'docs/*'
stages:
- stage: build
jobs:
- job:
pool:
vmImage: 'ubuntu-latest'
workspace:
clean: all
steps:
- task: Npm@1
displayName: 'npm install'
inputs:
command: 'ci'
- script: |
npx gulp setversion
npx vsce package --out '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
displayName: 'publish vsix build artifacts'
inputs:
pathToPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'VSIX-package'
- stage: publishInMarketplace
dependsOn: build
condition: and(succeeded(), eq(variables.isReleaseBranch, true))
jobs:
- deployment:
pool:
vmImage: 'ubuntu-latest'
environment: 'vscode-marketplace'
strategy:
runOnce:
deploy:
steps:
- pwsh: npx vsce publish --pat $env:MAPPED_PAT --packagePath '$(Pipeline.Workspace)'
env:
MAPPED_PAT: $(ngdseaPAT)