-
Notifications
You must be signed in to change notification settings - Fork 2
59 lines (51 loc) · 1.52 KB
/
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
# Modified from (GPL):
# https://github.com/travisgoodspeed/maskromtool/blob/master/.github/workflows/build.yml
name: Build
on: [workflow_dispatch, push]
jobs:
Build:
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]
include:
- os: windows-latest
os-caption: windows
- os: macos-latest
os-caption: macos
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- uses: AllanChain/install-qt-static@main
- uses: ilammy/msvc-dev-cmd@v1
if: contains(matrix.os, 'windows')
- name: Build Project
run: |
mkdir build
cd build
qt-cmake -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" ..
cmake --build . --parallel
- name: Packing (Windows)
if: contains(matrix.os, 'windows')
run: |
mkdir release
move build\Release\sane-break.exe release
- name: Packing (macOs)
if: contains(matrix.os, 'macos')
run: |
mkdir release
brew install create-dmg
create-dmg \
--volname "Sane Break" \
--hide-extension "sane-break.app" \
--window-size 600 450 \
--icon-size 94 \
--icon "sane-break" 141 249 \
--app-drop-link 458 249 \
"release/sane-break.dmg" \
"build/sane-break.app"
- name: Create Artifact
uses: actions/upload-artifact@v4
with:
name: "sane-break (${{matrix.os-caption}})"
path: ./release/*