-
Notifications
You must be signed in to change notification settings - Fork 116
184 lines (176 loc) · 6.02 KB
/
build.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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
name: build
on: [push]
env:
nodeVersion: '18.12.1'
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Create GH release
if: startsWith(github.ref, 'refs/tags/')
run: |
gh release create "${{github.ref_name}}" \
--draft \
--title="${{github.ref_name}}" \
--repo="$GITHUB_REPOSITORY"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-linux:
runs-on: ubuntu-latest
needs: create-release
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install development packages
run: |
sudo apt-get update
sudo apt-get install pkg-config build-essential cmake make fuse \
xserver-xorg-core mesa-common-dev libglu1-mesa-dev \
libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 \
libxcb-render-util0 libxcb-xinerama0
- name: Set up pkg2appimage
run: |
wget -c https://github.com/AppImageCommunity/pkg2appimage/releases/download/continuous/pkg2appimage--x86_64.AppImage
chmod +x ./pkg2appimage-*.AppImage
mv pkg2appimage-*.AppImage pkg2appimage.AppImage
sudo mv pkg2appimage.AppImage /usr/local/bin
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.nodeVersion }}
- name: Install dependencies
run: yarn install
- name: Download launcher executable
run: yarn run download-launcher-executable
- name: Lint strict
run: yarn run lint-strict
- name: Build
run: yarn run build
- name: Test
run: yarn run test
- name: Package
run: yarn run package
- name: Copy Linux-build-zip-output
uses: actions/upload-artifact@v4
with:
name: Linux-build-zip-output
path: |
./tmp-jam-pack-nodegui/jam-pack-nodegui-work/*.zip
- name: Copy Linux-build-deb-output
uses: actions/upload-artifact@v4
with:
name: Linux-build-deb-output
path: |
./tmp-jam-pack-nodegui/jam-pack-nodegui-work/*.deb
- name: Copy Linux-build-appimage-output
uses: actions/upload-artifact@v4
with:
name: Linux-build-appimage-output
path: |
./tmp-jam-pack-nodegui/jam-pack-nodegui-work/*.AppImage
- name: Download extraterm-commands
if: startsWith(github.ref, 'refs/tags/')
run: yarn run download-extraterm-commands
- name: Upload to GH release
if: startsWith(github.ref, 'refs/tags/')
run: |
gh release upload "${{github.ref_name}}" \
./tmp-jam-pack-nodegui/jam-pack-nodegui-work/*.zip \
./tmp-jam-pack-nodegui/jam-pack-nodegui-work/*.deb \
./tmp-jam-pack-nodegui/jam-pack-nodegui-work/*.AppImage \
./downloads/extraterm-commands*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-windows:
runs-on: windows-latest
needs: create-release
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install nsis
run: choco install nsis -y
- name: Install zip
run: choco install zip -y
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.nodeVersion }}
- name: Install dependencies
run: yarn install
- name: Download launcher executable
run: yarn run download-launcher-executable
- name: Lint strict
run: yarn run lint-strict
- name: Build
run: yarn run build
- name: Test
run: yarn run test
- name: Package
run: yarn run package
- name: Copy Windows-build-zip-output
uses: actions/upload-artifact@v4
with:
name: Windows-build-zip-output
path: |
./tmp-jam-pack-nodegui/jam-pack-nodegui-work/*.zip
- name: Copy Windows-build-exe-output
uses: actions/upload-artifact@v4
with:
name: Windows-build-exe-output
path: |
./tmp-jam-pack-nodegui/jam-pack-nodegui-work/*.exe
- name: Upload to GH release
if: startsWith(github.ref, 'refs/tags/')
run: |
gh release upload "${{github.ref_name}}" (get-item ./tmp-jam-pack-nodegui/jam-pack-nodegui-work/*.exe)
gh release upload "${{github.ref_name}}" (get-item ./tmp-jam-pack-nodegui/jam-pack-nodegui-work/*.zip)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-macos:
runs-on: macos-13
needs: create-release
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.nodeVersion }}
- name: Install dependencies
run: yarn install
- name: Download launcher executable
run: yarn run download-launcher-executable
- name: Lint strict
run: yarn run lint-strict
- name: Build
run: yarn run build
- name: Test
run: yarn run test
- name: Package
run: yarn run package
- name: Copy macOS-build-zip-output
uses: actions/upload-artifact@v4
with:
name: macOS-build-zip-output
path: |
./tmp-jam-pack-nodegui/jam-pack-nodegui-work/*.zip
- name: Copy macOS-build-dmg-output
uses: actions/upload-artifact@v4
with:
name: macOS-build-dmg-output
path: |
./tmp-jam-pack-nodegui/jam-pack-nodegui-work/*.dmg
- name: Upload to GH release
if: startsWith(github.ref, 'refs/tags/')
run: |
gh release upload "${{github.ref_name}}" \
./tmp-jam-pack-nodegui/jam-pack-nodegui-work/*.zip \
./tmp-jam-pack-nodegui/jam-pack-nodegui-work/*.dmg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}