Skip to content

Commit 275936c

Browse files
authored
Windows MSI package support (element-hq#387)
* Update package.json * Update package.json * Run `yarn fetch` so the artifacts are valid * Run `yarn fetch` so the artifacts are valid v2 * Update build.yaml
1 parent ce78c29 commit 275936c

File tree

2 files changed

+46
-6
lines changed

2 files changed

+46
-6
lines changed

.github/workflows/build.yaml

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,32 @@ concurrency:
77
group: ${{ github.workflow }}-${{ github.ref }}
88
cancel-in-progress: true
99
jobs:
10+
fetch:
11+
name: Prepare
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- uses: actions/setup-node@v3
17+
with:
18+
cache: "yarn"
19+
20+
- name: Install Deps
21+
run: "yarn install --pure-lockfile"
22+
23+
- name: Fetch Element Web
24+
run: yarn run fetch --noverify --cfgdir element.io/nightly
25+
26+
- uses: actions/upload-artifact@v3
27+
with:
28+
name: webapp
29+
retention-days: 1
30+
path: |
31+
webapp.asar
32+
package.json
33+
1034
windows:
35+
needs: fetch
1136
strategy:
1237
matrix:
1338
include:
@@ -21,6 +46,10 @@ jobs:
2146
steps:
2247
- uses: actions/checkout@v3
2348

49+
- uses: actions/download-artifact@v3
50+
with:
51+
name: webapp
52+
2453
- name: Cache .hak
2554
uses: actions/cache@v3
2655
with:
@@ -68,7 +97,7 @@ jobs:
6897
6998
- name: Build App
7099
run: "yarn build --publish never -w ${{ matrix.build-args }}"
71-
100+
72101
- name: Upload Artifacts
73102
uses: actions/upload-artifact@v3
74103
with:
@@ -77,6 +106,7 @@ jobs:
77106
retention-days: 1
78107

79108
linux:
109+
needs: fetch
80110
strategy:
81111
matrix:
82112
include:
@@ -88,6 +118,10 @@ jobs:
88118
steps:
89119
- uses: actions/checkout@v3
90120

121+
- uses: actions/download-artifact@v3
122+
with:
123+
name: webapp
124+
91125
- name: Cache .hak
92126
uses: actions/cache@v3
93127
with:
@@ -119,7 +153,7 @@ jobs:
119153

120154
- name: Build App
121155
run: "yarn build --publish never"
122-
156+
123157
- name: Upload Artifacts
124158
uses: actions/upload-artifact@v3
125159
with:
@@ -128,11 +162,16 @@ jobs:
128162
retention-days: 1
129163

130164
macos:
165+
needs: fetch
131166
name: macOS (universal)
132167
runs-on: macos-latest
133168
steps:
134169
- uses: actions/checkout@v3
135170

171+
- uses: actions/download-artifact@v3
172+
with:
173+
name: webapp
174+
136175
- name: Cache .hak
137176
uses: actions/cache@v3
138177
with:
@@ -159,7 +198,7 @@ jobs:
159198

160199
- name: Build App
161200
run: "yarn build:universal --publish never"
162-
201+
163202
- name: Upload Artifacts
164203
uses: actions/upload-artifact@v3
165204
with:

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,12 @@
122122
"darkModeSupport": true
123123
},
124124
"win": {
125-
"target": {
126-
"target": "squirrel"
127-
},
125+
"target": ["squirrel", "msi"],
128126
"sign": "scripts/electron_winSign"
129127
},
128+
"msi": {
129+
"perMachine": true
130+
},
130131
"directories": {
131132
"output": "dist"
132133
},

0 commit comments

Comments
 (0)