Skip to content

Commit 3baf97b

Browse files
committed
Add release action for electron platforms
1 parent 83d535f commit 3baf97b

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Build Electron Release
2+
3+
on:
4+
push:
5+
tags: -"v*.*.*"
6+
7+
jobs:
8+
build:
9+
strategy:
10+
matrix:
11+
os: [windows-latest]
12+
runs-on: ${{ matrix.os }}
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: 22.x
22+
23+
- name: Install dependencies
24+
run: npm install
25+
26+
- name: Build Electron App
27+
run: |
28+
npm run desktop-build
29+
30+
- name: Zip the build (Linux)
31+
run: |
32+
ZIP_NAME="linux.zip"
33+
zip -r "$ZIP_NAME" out-desktop
34+
shell: bash
35+
if: runner.os == 'Linux'
36+
37+
- name: Zip the build (Windows)
38+
run: |
39+
$ZIP_NAME = "windows-x64.zip"
40+
Compress-Archive -Path out-desktop -DestinationPath $ZIP_NAME
41+
shell: pwsh
42+
if: runner.os == 'Windows'
43+
44+
- name: Create Release Build (Linux)
45+
uses: softprops/action-gh-release@v2
46+
with:
47+
files: linux.zip
48+
if: runner.os == 'Linux'
49+
50+
- name: Create Release Build (Windows)
51+
uses: softprops/action-gh-release@v2
52+
with:
53+
files: windows-x64.zip
54+
if: runner.os == 'Windows'

0 commit comments

Comments
 (0)