-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (41 loc) · 1.32 KB
/
build_desktop.yml
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
name: Build for Desktop & Draft Release
on:
push:
branches: [main]
# Allow running this workflow manually from the Actions tab
workflow_dispatch:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write # for creating release draft
jobs:
build:
name: Build & Draft Release
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
node-version: [latest]
runs-on: ${{ matrix.os }}
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Build for Desktop
run: npm run build:desktop
- if: startsWith(matrix.os, 'ubuntu')
name: Pack for Linux
run: |
sudo apt-get install -y rpm
sudo snap install snapcraft --classic
npx electron-builder build --linux --x64 --publish=always
- if: startsWith(matrix.os, 'windows')
name: Pack for Windows
run: npx electron-builder build --win --x64 --arm64 --publish=always
- if: startsWith(matrix.os, 'macos')
name: Pack for macOS
run: npx electron-builder build --mac --x64 --universal --publish=always