macOS Build #59
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: macOS Build | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: macos-12 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
aqtversion: '==3.1.*' | |
version: '5.15.2' | |
host: 'mac' | |
target: 'desktop' | |
arch: 'clang_64' | |
archives: 'qtsvg qtbase qttools' | |
cache: 'true' | |
- name: Build | |
run: | | |
qmake | |
make -j5 | |
- name: Create Basic DMG | |
run: | | |
mkdir WordSearchCreator-Staging/ | |
mkdir WordSearchCreator-Staging/WordSearchCreator.app/ | |
cp -r WordSearchCreator.app/ WordSearchCreator-Staging/WordSearchCreator.app/ | |
hdiutil create -volname "WordSearchCreator" -srcfolder WordSearchCreator-Staging -ov -format UDZO WordSearchCreator-Basic.dmg | |
- name: Archive Basic DMG | |
uses: actions/upload-artifact@v4 | |
with: | |
name: basic-dmg | |
path: WordSearchCreator-Basic.dmg | |
- name: Create Deployable App Bundle | |
run: | | |
macdeployqt WordSearchCreator-Staging/WordSearchCreator.app -verbose=2 | |
cp images/*.icns WordSearchCreator-Staging/WordSearchCreator.app/Contents/Resources/ | |
cp Info.plist WordSearchCreator-Staging/WordSearchCreator.app/Contents/ | |
mkdir WordSearchCreator-Staging/WordSearchCreator.app/Contents/Resources/fonts | |
cp fonts/*.ttf WordSearchCreator-Staging/WordSearchCreator.app/Contents/Resources/fonts | |
- name: Create Deployable DMG | |
run: | | |
mv WordSearchCreator-Staging/WordSearchCreator.app/ WordSearchCreator-Staging/Word\ Search\ Creator.app/ | |
mkdir WordSearchCreator-Staging/.background | |
cp images/background.png WordSearchCreator-Staging/.background/ | |
hdiutil create -volname "WordSearchCreator" -srcfolder WordSearchCreator-Staging -ov -format UDRW WordSearchCreator-RW.dmg | |
hdiutil attach WordSearchCreator-RW.dmg | |
osascript setupDMGAppearance.applescript | |
hdiutil detach /Volumes/WordSearchCreator/ | |
hdiutil convert WordSearchCreator-RW.dmg -format UDZO -o WordSearchCreator.dmg | |
- name: Archive Deployable DMG | |
uses: actions/upload-artifact@v4 | |
with: | |
name: deployable-dmg | |
path: WordSearchCreator.dmg |