-
Notifications
You must be signed in to change notification settings - Fork 18
185 lines (159 loc) · 5.22 KB
/
electron-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
185
name: Electron build/release
on:
push:
pull_request:
release:
types:
- created
jobs:
update-version:
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v1
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 16
- name: Update package.json with GitHub tag
run: |
version=$(echo ${GITHUB_REF#refs/*/} | sed 's/^v//')
jq --arg version $version '.version = $version' taxonium_electron/package.json > temp.json
mv temp.json taxonium_electron/package.json
- name: Upload package.json as artifact
uses: actions/upload-artifact@v1
with:
name: package
path: taxonium_electron/package.json
build-mac:
needs: update-version
runs-on: macos-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v1
- name: Download updated package.json
uses: actions/download-artifact@v1
with:
name: package
path: taxonium_electron/
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 16
- name: Build Electron app with electron-builder
run: |
cd taxonium_electron
source download.sh
yarn install
yarn make --arch=arm64
yarn make --arch=x64
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: List output
run: |
cd taxonium_electron
cd out/make/
find .
- name: Store artifact
uses: actions/upload-artifact@v3
with:
name: Build
path: taxonium_electron/out/make/Taxonium-*-arm64.dmg
- name: Store artifact 2
uses: actions/upload-artifact@v3
with:
name: Build
path: taxonium_electron/out/make/Taxonium-*-x64.dmg
- uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: taxonium_electron/out/make/Taxonium-*-arm64.dmg
- uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: taxonium_electron/out/make/Taxonium-*-x64.dmg
build-win:
needs: update-version
runs-on: windows-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v1
- name: Download updated package.json
uses: actions/download-artifact@v1
with:
name: package
path: taxonium_electron/
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 16
- name: Build Electron app with electron-builder
run: |
cd taxonium_electron
mkdir binaries
choco install wget --no-progress
wget https://cov2tree.nyc3.cdn.digitaloceanspaces.com/node_binaries/node18.exe -O binaries/node18.exe
yarn install
yarn make --win --arch=x64
- name: List output
run: |
cd taxonium_electron
cd out/make/squirrel.windows/x64
dir
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Store artifact
uses: actions/upload-artifact@v3
with:
name: Build
path: "taxonium_electron/out/make/squirrel.windows/x64/Taxonium-* Setup.exe"
- uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: "taxonium_electron/out/make/squirrel.windows/x64/Taxonium-* Setup.exe"
build-linux:
needs: update-version
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v1
- name: Download updated package.json
uses: actions/download-artifact@v1
with:
name: package
path: taxonium_electron/
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 16
- name: Build Electron app with electron-builder
run: |
cd taxonium_electron
source download.sh
yarn install
yarn make --linux --arch=x64
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: List output
run: |
cd taxonium_electron
cd out/make
find .
- name: Store artifact
uses: actions/upload-artifact@v3
with:
name: Build
path: taxonium_electron/out/make/deb/x64/taxonium_*_amd64.deb
- name: Store artifact
uses: actions/upload-artifact@v3
with:
name: Build
path: taxonium_electron/out/make/rpm/x64/Taxonium-*-1.x86_64.rpm
- uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: taxonium_electron/out/make/rpm/x64/Taxonium-*-1.x86_64.rpm
- uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: taxonium_electron/out/make/deb/x64/taxonium_*_amd64.deb