-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (50 loc) · 1.81 KB
/
main.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
name: Build App
# Controls when the action will run.
on:
# Triggers the workflow on push for production branch
push:
branches:
- master
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
name: Build App
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- name: Check out the repository
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: '16.x'
- name: Install dependencies
run: yarn
- name: Install flatpak
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get install flatpak -y
sudo apt-get install flatpak-builder -y
sudo apt-get install elfutils -y
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
sudo flatpak install flathub org.freedesktop.Platform/x86_64/22.08 org.freedesktop.Sdk/x86_64/22.08 org.electronjs.Electron2.BaseApp/x86_64/22.08 -y
git config --global --add protocol.file.allow always
- name: Make and Publish (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
run: yarn run publish
env:
GITHUB_TOKEN: ${{ secrets.BUILD_TOKEN }}
- name: Make and Publish (WINDOWS)
if: startsWith(matrix.os, 'windows')
run: yarn run publish-windows
env:
GITHUB_TOKEN: ${{ secrets.BUILD_TOKEN }}
- name: Make and Publish (MAC)
if: startsWith(matrix.os, 'macos')
run: yarn run publish-mac
env:
GITHUB_TOKEN: ${{ secrets.BUILD_TOKEN }}