-
Notifications
You must be signed in to change notification settings - Fork 312
Expand file tree
/
Copy pathpublish.yml
More file actions
97 lines (87 loc) · 2.98 KB
/
publish.yml
File metadata and controls
97 lines (87 loc) · 2.98 KB
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
88
89
90
91
92
93
94
95
96
97
name: $(Date:yyyyMMdd)$(Rev:.r)
trigger:
branches:
include:
- main
pr: none
resources:
repositories:
- repository: templates
type: github
name: microsoft/vscode-engineering
ref: main
endpoint: Monaco
parameters:
- name: publishPackage
displayName: 🚀 Publish node-pty
type: boolean
default: false
- name: releaseQuality
displayName: Quality
type: string
values:
- beta
- stable
default: beta
variables:
- name: releaseQuality
value: ${{ parameters.releaseQuality }}
extends:
template: azure-pipelines/npm-package/pipeline.yml@templates
parameters:
npmPackages:
- name: node-pty
buildSteps:
- task: DownloadPipelineArtifact@2
displayName: 'Download prebuilds'
inputs:
buildType: 'specific'
project: 'Monaco'
definition: '647'
buildVersionToDownload: 'latestFromBranch'
branchName: '$(Build.SourceBranch)'
artifactName: 'prebuilds-$(Build.SourceVersion)'
targetPath: 'prebuilds'
- pwsh: |
Get-ChildItem -Path . -Recurse -Directory -Name "_manifest" | Remove-Item -Recurse -Force
displayName: 'Delete _manifest folders'
- bash: chmod +x prebuilds/darwin-*/spawn-helper
displayName: 'Ensure spawn-helper is executable'
- script: npm ci
displayName: 'Install dependencies and build'
# The following script leaves the version unchanged for
# stable releases, but increments the version for beta releases.
- script: node scripts/increment-version.js
displayName: 'Increment version'
testSteps:
- task: DownloadPipelineArtifact@2
displayName: 'Download prebuilds'
inputs:
buildType: 'specific'
project: 'Monaco'
definition: '647'
buildVersionToDownload: 'latestFromBranch'
branchName: '$(Build.SourceBranch)'
artifactName: 'prebuilds-$(Build.SourceVersion)'
targetPath: 'prebuilds'
- bash: chmod +x prebuilds/darwin-*/spawn-helper
displayName: 'Ensure spawn-helper is executable'
- script: npm ci
displayName: 'Install dependencies and build'
- script: npm test
displayName: 'Test'
- script: npm run lint
displayName: 'Lint'
publishPackage: ${{ parameters.publishPackage }}
${{ if eq(variables['releaseQuality'], 'stable') }}:
tag: latest
publishRequiresApproval: true
${{ else }}:
tag: beta
publishRequiresApproval: false
apiScanExcludes: |
package/third_party/conpty/**/win10-arm64/*.*
package/prebuilds/win32-arm64/conpty/*.*
package/prebuilds/win32-arm64/*.*
apiScanSoftwareName: 'vscode-node-pty'
apiScanSoftwareVersion: '1'