-
Notifications
You must be signed in to change notification settings - Fork 0
137 lines (115 loc) · 3.56 KB
/
Copy pathrelease.yml
File metadata and controls
137 lines (115 loc) · 3.56 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
130
131
132
133
134
135
136
137
name: Build and Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: |
package-lock.json
renderer/package-lock.json
- name: Install Linux build dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
rpm fakeroot libc6-dev \
libnss3 libgtk-3-0 libnotify4 libxss1 libxtst6 libdrm2 libgbm1 \
libasound2t64 libsecret-1-dev
- name: Install root dependencies
run: npm ci
- name: Install renderer dependencies
run: |
cd renderer
npm ci
- name: Rebuild native modules for Electron
run: npm run rebuild
- name: Build renderer
run: npm run build:renderer
- name: Build Electron app (macOS)
if: matrix.os == 'macos-latest'
run: npm run dist:mac
env:
CSC_IDENTITY_AUTO_DISCOVERY: false
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build Electron app (Windows)
if: matrix.os == 'windows-latest'
run: npm run dist:win
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build Electron app (Linux)
if: matrix.os == 'ubuntu-latest'
run: npm run dist:linux
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Only primary installers (no .pak, blockmaps, zips, deb/rpm, unpacked dirs) — smaller artifacts + release.
- name: Upload macOS artifacts
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v4
with:
name: dist-macos
path: dist-electron/*.dmg
if-no-files-found: error
- name: Upload Windows artifacts
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: dist-windows
path: dist-electron/*.exe
if-no-files-found: error
- name: Upload Linux artifacts
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: dist-linux
path: dist-electron/*.AppImage
if-no-files-found: error
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download macOS artifacts
uses: actions/download-artifact@v4
with:
name: dist-macos
path: dist-electron/macos
- name: Download Windows artifacts
uses: actions/download-artifact@v4
with:
name: dist-windows
path: dist-electron/windows
- name: Download Linux artifacts
uses: actions/download-artifact@v4
with:
name: dist-linux
path: dist-electron/linux
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: |
dist-electron/macos/*.dmg
dist-electron/windows/*.exe
dist-electron/linux/*.AppImage
fail_on_unmatched_files: true
draft: false
prerelease: false
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}