@@ -3,6 +3,8 @@ name: Release
3
3
on :
4
4
push :
5
5
tags : ' *'
6
+ pull_request :
7
+ branches : [ "master" ]
6
8
7
9
jobs :
8
10
build-linux-release :
@@ -224,6 +226,60 @@ jobs:
224
226
name : build-windows
225
227
path : ' *installer.exe'
226
228
229
+ build-macos-release :
230
+ runs-on : macos-14
231
+ strategy :
232
+ matrix :
233
+ os : [macos-14]
234
+ qt-version : ['6.8']
235
+ qt-target : ['desktop']
236
+ steps :
237
+ - uses : actions/checkout@v4
238
+ with :
239
+ fetch-depth : 0
240
+ submodules : ' recursive'
241
+ - name : Setup environment
242
+ run : |
243
+ sed -i -e '/^#/d' .github/config.env
244
+ sed -i -e '/^$/d' .github/config.env
245
+ cat .github/config.env >> "${GITHUB_ENV}"
246
+ shell : bash
247
+ - name : Set up node.js
248
+ uses : actions/setup-node@v3
249
+ - if : env.build_on_new_tags != 1
250
+ name : Cancel if build on new tags is disabled
251
+ uses : andymckay/cancel-action@0.2
252
+ - name : Get version
253
+ run : |
254
+ version=$(LC_ALL=en_US.UTF-8 sed -n 's/.*project([^)]* VERSION \([0-9]\+\.[0-9]\+\.[0-9]\+\)).*/\1/p' CMakeLists.txt)
255
+ echo "Project version: $version"
256
+ echo previous_tag=$version >> "${GITHUB_ENV}"
257
+ shell : bash
258
+ - if : contains(github.ref, '-')
259
+ name : Check if this is a pre-release
260
+ run : echo is_prerelease=1 >> "${GITHUB_ENV}"
261
+ shell : bash
262
+ - name : Set up node.js
263
+ uses : actions/setup-node@v3
264
+ # Install Qt
265
+ - name : Install Qt
266
+ uses : jurplel/install-qt-action@v3
267
+ with :
268
+ version : ${{ matrix.qt-version }}
269
+ host : ' mac'
270
+ target : ${{ matrix.qt-target }}
271
+ modules : ' '
272
+ # Build
273
+ - name : Build
274
+ run : .ci/macos_build.sh
275
+ shell : bash
276
+ # Upload
277
+ - name : Upload artifacts
278
+ uses : actions/upload-artifact@v4
279
+ with :
280
+ name : build-Qt-${{ matrix.qt-version }}
281
+ path : ' *.dmg'
282
+
227
283
# Release
228
284
release :
229
285
runs-on : ubuntu-latest
@@ -275,8 +331,7 @@ jobs:
275
331
name : Create release
276
332
uses : ncipollo/release-action@v1
277
333
with :
278
- # artifacts: "build-windows/*.exe,build-linux-*/*.AppImage,build-linux-*/*.zsync,build-macos/*.dmg"
279
- artifacts : " build-windows/*.exe,build-linux-*/*.AppImage,build-linux-*/*.zsync"
334
+ artifacts : " build-windows/*.exe,build-linux-*/*.AppImage,build-linux-*/*.zsync,build-macos/*.dmg"
280
335
name : " ${{ env.app_name }} ${{ env.version }}"
281
336
owner : ${{ github.event.pusher.name }}
282
337
draft : true
0 commit comments