-
Notifications
You must be signed in to change notification settings - Fork 17
110 lines (93 loc) · 2.8 KB
/
desktop-build.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
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
name: Build Desktop App
on:
push:
branches:
- main
pull_request:
merge_group:
jobs:
prepare:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: "yarn"
node-version-file: ".nvmrc"
- uses: actions/setup-go@v3
with:
go-version: "1.20"
- name: Install node modules
run: yarn
- name: Prepare
run: make prepare-electron
- name: Upload web build
uses: actions/upload-artifact@v3
with:
name: electron-web-build
path: electron/web-build
if-no-files-found: error
build:
needs: prepare
strategy:
matrix:
include:
- os: linux
runner: ubuntu-latest
arch: amd64
- os: macos
runner: macos-latest
arch: amd64
- os: windows
runner: macos-latest
arch: amd64
runs-on: ${{ matrix.runner }}
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: "yarn"
node-version-file: ".nvmrc"
- uses: actions/setup-go@v3
with:
go-version: "1.20"
- name: Install node modules
run: yarn
- name: Download web build
uses: actions/download-artifact@v3
with:
name: electron-web-build
path: electron/web-build
- name: Build ${{ matrix.os }}-${{ matrix.arch }}
run: make build-electron-${{ matrix.os }}-${{ matrix.arch }}
- name: Upload AppImage
uses: actions/upload-artifact@v3
if: matrix.os == 'linux'
with:
name: teritori-${{ github.sha }}-${{ matrix.os }}-${{ matrix.arch }}-AppImage
path: electron/dist/artifacts/local/*.AppImage
if-no-files-found: error
- name: Upload deb
uses: actions/upload-artifact@v3
if: matrix.os == 'linux'
with:
name: teritori-${{ github.sha }}-${{ matrix.os }}-${{ matrix.arch }}-deb
path: electron/dist/artifacts/local/*.deb
if-no-files-found: error
- name: Upload dmg
uses: actions/upload-artifact@v3
if: matrix.os == 'macos'
with:
name: teritori-${{ github.sha }}-${{ matrix.os }}-${{ matrix.arch }}-dmg
path: electron/dist/artifacts/local/*.dmg
if-no-files-found: error
- name: Upload exe
uses: actions/upload-artifact@v3
if: matrix.os == 'windows'
with:
name: teritori-${{ github.sha }}-${{ matrix.os }}-${{ matrix.arch }}-exe
path: electron/dist/artifacts/local/*.exe
if-no-files-found: error