-
Notifications
You must be signed in to change notification settings - Fork 18
105 lines (84 loc) · 3.06 KB
/
electron-app.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
name: Build the Electron version of Magrit
on:
push:
tags:
- "v*.*.*"
jobs:
build-linux-windows:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install Mono and Wine
run: |
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install -y wine64 wine32 mono-complete
- name: Install dependencies
run: npm install
- name: Build application and create distribution
run: npm run build:electron
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Read version from package.json
id: get_version
run: echo "version=$(node -p -e "require('./package.json').version")" >> $GITHUB_OUTPUT
- name: Upload .exe artifacts
uses: actions/upload-artifact@v4
with:
name: windows-build
path: release/${{ steps.get_version.outputs.version }}/*.exe
- name: Upload .AppImage artifacts
uses: actions/upload-artifact@v4
with:
name: linux-build
path: release/${{ steps.get_version.outputs.version }}/*.AppImage
- name: Upload Artifacts to Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
release/${{ steps.get_version.outputs.version }}/Magrit-Windows-${{ steps.get_version.outputs.version }}-portable.exe
release/${{ steps.get_version.outputs.version }}/Magrit-Linux-${{ steps.get_version.outputs.version }}.AppImage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-macos:
runs-on: macos-latest
strategy:
matrix:
node-version: [20.x]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
- name: Build application and create distribution
run: npm run build:electron-mac
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Read version from package.json
id: get_version
run: echo "version=$(node -p -e "require('./package.json').version")" >> $GITHUB_OUTPUT
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: macos-build
path: release/${{ steps.get_version.outputs.version }}/*.dmg
- name: Upload macOS Artifacts to Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: release/${{ steps.get_version.outputs.version }}/Magrit-Mac-${{ steps.get_version.outputs.version }}-Installer.dmg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}