-
Notifications
You must be signed in to change notification settings - Fork 4
129 lines (113 loc) · 3.45 KB
/
Copy pathbuild-electron.yml
File metadata and controls
129 lines (113 loc) · 3.45 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
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
name: Build Electron Applications
on:
push:
tags: ['v*']
pull_request:
branches: [main, dev]
permissions:
contents: read
jobs:
build-electron-renderer:
name: Build Electron Renderer
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'npm'
cache-dependency-path: 'client/package-lock.json'
- name: Install dependencies
run: |
cd client
npm ci
- name: Build Electron renderer
run: |
cd client
BUILD_TARGET=electron npm run build
- name: Upload Electron renderer build
uses: actions/upload-artifact@v4
with:
name: electron-renderer
path: client/dist-electron/
retention-days: 7
build-electron-apps:
name: Build Electron App (${{ matrix.platform }})
needs: build-electron-renderer
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- os: ubuntu-latest
platform: linux
artifact_patterns: |
electron/out/make/deb/x64/*.deb
electron/out/make/rpm/x64/*.rpm
- os: windows-latest
platform: windows
artifact_patterns: |
electron/out/make/squirrel.windows/x64/*.exe
electron/out/make/squirrel.windows/x64/*.nupkg
electron/out/make/squirrel.windows/x64/RELEASES
- os: macos-latest
platform: macos
artifact_patterns: |
electron/out/make/**/*.zip
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24.15.0'
cache: 'npm'
cache-dependency-path: 'electron/package-lock.json'
- name: Download Electron renderer build
uses: actions/download-artifact@v4
with:
name: electron-renderer
path: client/dist-electron
- name: Install Electron dependencies
run: |
cd electron
npm ci
- name: Make installers
run: |
cd electron
npm run make
- name: Upload installers
uses: actions/upload-artifact@v4
with:
name: electron-${{ matrix.platform }}-installers
path: ${{ matrix.artifact_patterns }}
if-no-files-found: error
retention-days: 7
upload-electron-to-release:
name: Upload Electron Apps to Release
needs: build-electron-apps
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: List downloaded artifacts (debug)
run: |
echo "Downloaded artifacts:"
ls -R artifacts/
- name: Upload to release
uses: softprops/action-gh-release@v2
with:
files: |
artifacts/electron-linux-installers/**/*.deb
artifacts/electron-linux-installers/**/*.rpm
artifacts/electron-windows-installers/**/*.exe
artifacts/electron-macos-installers/**/*.zip
token: ${{ secrets.GITHUB_TOKEN }}