-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (88 loc) · 3.05 KB
/
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
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: CI
on:
push:
branches:
- main
tags:
- "v*"
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
- run: npm install --no-package-lock
- name: lint
run: npm run lint
- run: xvfb-run -a npm test
if: runner.os == 'Linux'
- run: npm test
if: runner.os != 'Linux'
test-jre-download:
runs-on: ubuntu-latest
name: Test JRE Download and Package
steps:
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
- uses: actions/checkout@v3
- run: npm install --no-package-lock
- name: Downlaod JRE Windows
run: node ./build.mjs download-jre --platform win32
- name: Package Windows Extension
run: npx @vscode/vsce package --target win32-x64
- name: Downlaod JRE MacOS x64
run: node ./build.mjs download-jre --platform darwin
- name: Package MacOS x64 Extension
run: npx @vscode/vsce package --target darwin-x64
- name: Downlaod JRE MacOS arm64
run: node ./build.mjs download-jre --platform darwin_arm64
- name: Package MacOS arm64 Extension
run: npx @vscode/vsce package --target darwin-arm64
- name: Downlaod JRE Linux
run: node ./build.mjs download-jre --platform linux
- name: Package Linux Extension
run: npx @vscode/vsce package --target linux-x64
publish:
needs: [build]
if: ${{ startsWith(github.event.ref, 'refs/tags/v') && needs.build.result == 'success' }}
runs-on: ubuntu-latest
name: Release Extension
steps:
- uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Build
run: npm install --no-package-lock
- name: Downlaod Language Server
run: node ./build.mjs download-server
- name: Downlaod JRE Windows
run: node ./build.mjs download-jre --platform win32
- name: Package Windows extension
run: npx @vscode/vsce package --target win32-x64
- name: Downlaod JRE MacOS x64
run: node ./build.mjs download-jre --platform darwin
- name: Package MacOS x64 extension
run: npx @vscode/vsce package --target darwin-x64
- name: Downlaod JRE MacOS arm64
run: node ./build.mjs download-jre --platform darwin_arm64
- name: Package MacOS arm64 extension
run: npx @vscode/vsce package --target darwin-arm64
- name: Downlaod JRE Linux
run: node ./build.mjs download-jre --platform linux
- name: Package Linux extension
run: npx @vscode/vsce package --target linux-x64
- name: Publish extensions
run: npx @vscode/vsce publish --pat ${{ secrets.VS_MARKETPLACE_TOKEN }} --packagePath vscode-natural-*.vsix