@@ -35,12 +35,40 @@ jobs:
35
35
run : npm run react-build
36
36
37
37
# ---------------------------------
38
- # macOS Build (Sign only, no auto-notarize)
38
+ # Windows Build
39
39
# ---------------------------------
40
- - name : Print environment for debugging
41
- if : matrix.os == 'macos-latest'
42
- run : printenv | sort
40
+ - name : Build Electron app (Windows)
41
+ if : matrix.os == 'windows-latest'
42
+ env :
43
+ DEBUG : electron-builder
44
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
45
+ run : npm run electron-build
46
+
47
+ # ---------------------------------
48
+ # Linux Build
49
+ # ---------------------------------
50
+ - name : Build Electron app (Linux)
51
+ if : matrix.os == 'ubuntu-latest-large'
52
+ env :
53
+ DEBUG : electron-builder
54
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
55
+ run : |
56
+ # Show electron-builder version
57
+ npx electron-builder --version
58
+
59
+ # List contents before build
60
+ ls -la
61
+
62
+ # Run build with verbose logging
63
+ npx electron-builder --linux AppImage --x64
64
+
65
+ # Show build output directory
66
+ echo "Build output directory contents:"
67
+ ls -la dist/
43
68
69
+ # ---------------------------------
70
+ # macOS Build
71
+ # ---------------------------------
44
72
- name : Build & Sign Electron app (macOS)
45
73
if : matrix.os == 'macos-latest'
46
74
env :
@@ -97,3 +125,150 @@ jobs:
97
125
98
126
echo "Stapling notarization..."
99
127
xcrun stapler staple "$DMG_FILE"
128
+
129
+ # ---------------------------------
130
+ # Upload Artifacts
131
+ # ---------------------------------
132
+ - name : Check Linux build output
133
+ if : matrix.os == 'ubuntu-latest-large'
134
+ run : |
135
+ echo "Checking build output..."
136
+ if [ ! -d "dist" ]; then
137
+ echo "Error: dist directory not found"
138
+ exit 1
139
+ fi
140
+ find dist -type f -name "*.AppImage" || echo "No AppImage files found in dist/"
141
+
142
+ - name : Upload Linux artifacts
143
+ if : matrix.os == 'ubuntu-latest-large'
144
+ uses : actions/upload-artifact@v4
145
+ with :
146
+ name : linux-build
147
+ path : |
148
+ dist/*.AppImage
149
+ if-no-files-found : error
150
+
151
+ - name : Upload Windows artifacts
152
+ if : matrix.os == 'windows-latest'
153
+ uses : actions/upload-artifact@v4
154
+ with :
155
+ name : windows-build
156
+ path : |
157
+ dist/*.exe
158
+ if-no-files-found : error
159
+
160
+ - name : Upload macOS artifacts
161
+ if : matrix.os == 'macos-latest'
162
+ uses : actions/upload-artifact@v4
163
+ with :
164
+ name : macos-build
165
+ path : |
166
+ dist/*.dmg
167
+ if-no-files-found : error
168
+
169
+ # -------------------------------------
170
+ # Separate upload-to-releases job
171
+ # -------------------------------------
172
+ upload-to-releases :
173
+ name : Upload to releases.drivechain.info
174
+ runs-on : ubuntu-latest
175
+ needs : [build]
176
+ if : github.event_name == 'push' && github.repository_owner == 'LayerTwo-Labs'
177
+ steps :
178
+ - name : Download artifacts
179
+ uses : actions/download-artifact@v4
180
+ with :
181
+ pattern : " *-build"
182
+ path : artifacts
183
+
184
+ - name : List downloaded files
185
+ run : |
186
+ echo "Artifacts directory contents:"
187
+ ls -la artifacts
188
+ echo "Linux build directory contents:"
189
+ ls -la artifacts/linux-build
190
+ echo "Windows build directory contents:"
191
+ ls -la artifacts/windows-build
192
+ echo "macOS build directory contents:"
193
+ ls -la artifacts/macos-build
194
+
195
+ - name : Process artifacts
196
+ run : |
197
+ # Process Linux artifact
198
+ cd artifacts/linux-build
199
+ mv *.AppImage ../../drivechain-launcher-latest-x86_64-linux.AppImage
200
+ cd ../..
201
+
202
+ # Process Windows artifact
203
+ cd artifacts/windows-build
204
+ echo "Windows build directory contents before processing:"
205
+ ls -la
206
+
207
+ # Find the exact exe file
208
+ EXE_FILE=$(ls Drivechain-Launcher-Setup-*.exe 2>/dev/null || echo "")
209
+ if [ -z "$EXE_FILE" ]; then
210
+ echo "Error: No Windows exe file found"
211
+ exit 1
212
+ fi
213
+ echo "Found Windows exe file: $EXE_FILE"
214
+
215
+ # Create zip file containing the exe
216
+ zip ../../drivechain-launcher-latest-windows.zip "$EXE_FILE"
217
+ cd ../..
218
+
219
+ # Process macOS artifacts
220
+ cd artifacts/macos-build
221
+ echo "macOS build directory contents before processing:"
222
+ ls -la
223
+
224
+ # Process arm64 DMG
225
+ ARM64_DMG=$(ls *-arm64.dmg 2>/dev/null || echo "")
226
+ if [ -z "$ARM64_DMG" ]; then
227
+ echo "Error: No arm64 DMG file found"
228
+ exit 1
229
+ fi
230
+ mv "$ARM64_DMG" ../../drivechain-launcher-latest-osx-arm64.dmg
231
+
232
+ # Process x64 DMG
233
+ X64_DMG=$(ls *-x64.dmg 2>/dev/null || echo "")
234
+ if [ -z "$X64_DMG" ]; then
235
+ echo "Error: No x64 DMG file found"
236
+ exit 1
237
+ fi
238
+ mv "$X64_DMG" ../../drivechain-launcher-latest-osx-x64.dmg
239
+ cd ../..
240
+
241
+ echo "Final files:"
242
+ ls -la drivechain-launcher-*
243
+
244
+ - name : Verify files exist
245
+ run : |
246
+ if [ ! -f "drivechain-launcher-latest-x86_64-linux.AppImage" ]; then
247
+ echo "Error: Linux AppImage file not found"
248
+ exit 1
249
+ fi
250
+ if [ ! -f "drivechain-launcher-latest-windows.zip" ]; then
251
+ echo "Error: Windows zip file not found"
252
+ exit 1
253
+ fi
254
+ if [ ! -f "drivechain-launcher-latest-osx-arm64.dmg" ]; then
255
+ echo "Error: macOS arm64 DMG file not found"
256
+ exit 1
257
+ fi
258
+ if [ ! -f "drivechain-launcher-latest-osx-x64.dmg" ]; then
259
+ echo "Error: macOS x64 DMG file not found"
260
+ exit 1
261
+ fi
262
+
263
+ - name : Upload to releases.drivechain.info
264
+ uses : cross-the-world/ssh-scp-ssh-pipelines@latest
265
+ with :
266
+ host : 45.33.96.47
267
+ user : root
268
+ pass : ${{ secrets.RELEASES_SERVER_PW }}
269
+ port : 22
270
+ scp : |
271
+ 'drivechain-launcher-latest-x86_64-linux.AppImage' => '/var/www/html/'
272
+ 'drivechain-launcher-latest-windows.zip' => '/var/www/html/'
273
+ 'drivechain-launcher-latest-osx-arm64.dmg' => '/var/www/html/'
274
+ 'drivechain-launcher-latest-osx-x64.dmg' => '/var/www/html/'
0 commit comments