-
Notifications
You must be signed in to change notification settings - Fork 16
103 lines (88 loc) · 2.63 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
name: Build Desktop App
on:
push:
branches:
- main
pull_request:
jobs:
prepare:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: "yarn"
node-version: 18
- uses: actions/setup-go@v3
with:
go-version: "1.19"
- 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@v3
- uses: actions/setup-node@v3
with:
cache: "npm"
node-version: 18
- uses: actions/setup-go@v3
with:
go-version: "1.19"
- 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