-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (47 loc) · 1.87 KB
/
desktop-build.yml
File metadata and controls
57 lines (47 loc) · 1.87 KB
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
# Optional: pack the Expo web export as a Windows portable .exe (Electron).
# Run manually: Actions → "Build desktop (Electron)" → Run workflow.
# Uses the same public env secrets as Deploy web to GitHub Pages where applicable.
name: Build desktop (Electron)
on:
workflow_dispatch:
jobs:
windows-portable:
runs-on: windows-latest
steps:
- name: Checkout (with submodules)
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"
cache: npm
cache-dependency-path: |
package-lock.json
desktop/package-lock.json
- name: Use npm 10 for npm ci
run: npm install -g npm@10.9.2
- name: Install root dependencies
run: npm ci
- name: Export web for Electron (no Pages base path)
env:
EXPO_PUBLIC_BASE_PATH: ""
EXPO_PUBLIC_INFLUX_URL: ${{ secrets.EXPO_PUBLIC_INFLUX_URL }}
EXPO_PUBLIC_INFLUX_TOKEN: ${{ secrets.EXPO_PUBLIC_INFLUX_TOKEN }}
EXPO_PUBLIC_INFLUX_ORG: ${{ secrets.EXPO_PUBLIC_INFLUX_ORG }}
EXPO_PUBLIC_INFLUX_BUCKET: ${{ secrets.EXPO_PUBLIC_INFLUX_BUCKET }}
EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY: ${{ secrets.EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY }}
MAPBOX_ACCESS_TOKEN: ${{ secrets.MAPBOX_ACCESS_TOKEN }}
run: npm run export:web:desktop
- name: Install desktop dependencies
run: npm ci --prefix desktop
# electron-builder uses cwd as app root; --prefix only affects npx, not projectDir.
- name: Build portable executable
working-directory: desktop
run: npx electron-builder --win portable
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: sc2-desktop-windows-portable
path: desktop/dist/*.exe