Skip to content

CMake Mac

CMake Mac #9

Workflow file for this run

name: CMake Mac
on:
push:
branches: [ "main" ]
paths-ignore:
- '.github/workflows/*.yml'
- '*.md'
pull_request:
branches: [ "main" ]
paths-ignore:
- '.github/workflows/*.yml'
- '*.md'
workflow_dispatch:
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Install create-dmg
run: brew install create-dmg
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
aqtversion: '==3.1.*'
version: '5.15.2'
host: 'mac'
target: 'desktop'
arch: 'clang_64'
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_MACOSX_BUNDLE=ON
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: macdeployqt
run: macdeployqt ${{ github.workspace }}/build/xDXFViewer.app -dmg -verbose=3
- name: Build DMG
run: create-dmg xDXFViewer.dmg ./build/xDXFViewer.app
- name: Upload Installer
uses: actions/upload-artifact@v3
with:
name: xDXFViewer
path: '**.dmg'
- name: Create prerelease
if: github.ref == 'refs/heads/main'
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: true
automatic_release_tag: "ci_mac"
title: "${{ steps.version.outputs.version }}"
files: |
xDXFViewer.dmg