-
-
Notifications
You must be signed in to change notification settings - Fork 518
136 lines (110 loc) · 3.41 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
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name: CI
on:
push:
branches:
- master
release:
types:
- published
pull_request:
jobs:
build_win:
name: Build (Windows)
runs-on: windows-latest
steps:
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.x'
- uses: actions/checkout@v4
- name: Build
working-directory: ./windows
run: |
dotnet publish -c Release -r win-x64 --self-contained true
- name: Create installer
working-directory: ./windows
run: |
iscc install_compiler.iss
- uses: actions/upload-artifact@v4
with:
name: qmk_toolbox.exe
path: windows/QMK Toolbox/bin/Release/win-x64/publish/qmk_toolbox.exe
- uses: actions/upload-artifact@v4
with:
name: qmk_toolbox_install.exe
path: windows/qmk_toolbox_install.exe
build_macos:
name: Build (macOS)
runs-on: macOS-latest
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- uses: actions/checkout@v4
- name: Check binary permissions
working-directory: ./macos/QMK Toolbox/Resources
env:
QMK_BINARIES: avrdude bootloadHID dfu-programmer dfu-util mdloader teensy_loader_cli wb32-dfu-updater_cli
run: |
status=0
for b in $QMK_BINARIES; do
perm=$(stat -f "%Lp" $b)
echo "$b: $perm"
[[ $perm == "755" ]] || status=1
done
exit $status
- name: Build
working-directory: ./macos
run: |
mkdir build
xcodebuild CONFIGURATION_BUILD_DIR=build
ditto -ck --rsrc --sequesterRsrc -v --keepParent "build/QMK Toolbox.app" build/QMK.Toolbox.app.zip
- uses: actions/upload-artifact@v4
with:
name: QMK.Toolbox.app.zip
path: macos/build/QMK.Toolbox.app.zip
- name: Create installer
working-directory: ./macos
run: |
brew update
brew install packages
packagesbuild -v "QMK Toolbox.pkgproj"
mv "build/QMK Toolbox.pkg" build/QMK.Toolbox.pkg
- uses: actions/upload-artifact@v4
with:
name: QMK.Toolbox.pkg
path: macos/build/QMK.Toolbox.pkg
publish_release:
name: Publish (Release)
runs-on: ubuntu-latest
needs: [build_win, build_macos]
if: github.event.release.tag_name
steps:
- uses: actions/download-artifact@v4
- uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: ${{ github.event.release.name }}
files: |
./qmk_toolbox.exe/qmk_toolbox.exe
./qmk_toolbox_install.exe/qmk_toolbox_install.exe
./QMK.Toolbox.app.zip/QMK.Toolbox.app.zip
./QMK.Toolbox.pkg/QMK.Toolbox.pkg
publish_beta:
name: Publish (Beta)
runs-on: ubuntu-latest
needs: [build_win, build_macos]
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
steps:
- uses: actions/download-artifact@v4
- uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "beta"
prerelease: true
title: "Latest Beta"
files: |
./qmk_toolbox.exe/qmk_toolbox.exe
./qmk_toolbox_install.exe/qmk_toolbox_install.exe
./QMK.Toolbox.app.zip/QMK.Toolbox.app.zip
./QMK.Toolbox.pkg/QMK.Toolbox.pkg