@@ -161,8 +161,40 @@ jobs:
161161 name : SerialPortConnector-Linux
162162 path : SerialPortConnector*.AppImage
163163
164+ build-macos :
165+ runs-on : macos-latest # ARM64 runner, builds universal binary
166+
167+ steps :
168+ - uses : actions/checkout@v4
169+
170+ - name : Install Qt
171+ uses : jurplel/install-qt-action@v4
172+ with :
173+ version : ' 5.15.2'
174+ host : ' mac'
175+ target : ' desktop'
176+ cache : true
177+
178+ - name : Build
179+ run : |
180+ mkdir build && cd build
181+ qmake ../SerialPortConnector.pro CONFIG+=release
182+ make -j$(sysctl -n hw.ncpu)
183+
184+ - name : Deploy
185+ run : |
186+ cd build
187+ macdeployqt SerialPortConnector.app -dmg
188+ mv SerialPortConnector.dmg ../SerialPortConnector-macOS.dmg
189+
190+ - name : Upload macOS artifact
191+ uses : actions/upload-artifact@v4
192+ with :
193+ name : SerialPortConnector-macOS
194+ path : SerialPortConnector-macOS.dmg
195+
164196 create-release :
165- needs : [build-windows, build-linux]
197+ needs : [build-windows, build-linux, build-macos ]
166198 runs-on : ubuntu-latest
167199 if : startsWith(github.ref, 'refs/tags/')
168200
@@ -181,5 +213,6 @@ jobs:
181213 files : |
182214 SerialPortConnector-Windows.zip
183215 SerialPortConnector-Linux/*.AppImage
216+ SerialPortConnector-macOS/*.dmg
184217 env :
185218 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments