@@ -3,6 +3,8 @@ name: Release
33on :
44 push :
55 tags : ' *'
6+ pull_request :
7+ branches : [ "master" ]
68
79jobs :
810 build-linux-release :
@@ -224,6 +226,61 @@ jobs:
224226 name : build-windows
225227 path : ' *installer.exe'
226228
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+ brew install grep
255+ version=$(LC_ALL=en_US.utf8 ggrep -oP 'project\([^)]*\s+VERSION\s+\K[0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt)
256+ echo "Project version: $version"
257+ echo previous_tag=$version >> "${GITHUB_ENV}"
258+ shell : bash
259+ - if : contains(github.ref, '-')
260+ name : Check if this is a pre-release
261+ run : echo is_prerelease=1 >> "${GITHUB_ENV}"
262+ shell : bash
263+ - name : Set up node.js
264+ uses : actions/setup-node@v3
265+ # Install Qt
266+ - name : Install Qt
267+ uses : jurplel/install-qt-action@v3
268+ with :
269+ version : ${{ matrix.qt-version }}
270+ host : ' mac'
271+ target : ${{ matrix.qt-target }}
272+ modules : ' '
273+ # Build
274+ - name : Build
275+ run : .ci/macos_build.sh
276+ shell : bash
277+ # Upload
278+ - name : Upload artifacts
279+ uses : actions/upload-artifact@v4
280+ with :
281+ name : build-Qt-${{ matrix.qt-version }}
282+ path : ' *.dmg'
283+
227284 # Release
228285 release :
229286 runs-on : ubuntu-latest
@@ -275,8 +332,7 @@ jobs:
275332 name : Create release
276333 uses : ncipollo/release-action@v1
277334 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"
335+ artifacts : " build-windows/*.exe,build-linux-*/*.AppImage,build-linux-*/*.zsync,build-macos/*.dmg"
280336 name : " ${{ env.app_name }} ${{ env.version }}"
281337 owner : ${{ github.event.pusher.name }}
282338 draft : true
0 commit comments