Skip to content

macOS Build

macOS Build #12

Workflow file for this run

name: macOS Build
on:
workflow_dispatch:
inputs:
tags:
description: 'macOS latest'
jobs:
build:
runs-on: macos-latest
strategy:
matrix:
arch: ["x86_64", "arm64"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies (${{ matrix.arch }})
run: |
python -m pip install --upgrade pip
arch -${{ matrix.arch }} pip install pyinstaller -r src/requirements.txt
- name: Build with PyInstaller (${{ matrix.arch }})
run: |
cd src
arch -${{ matrix.arch }} pyinstaller QtTinySA.spec
cd ..
- name: Create DMG (${{ matrix.arch }})
run: |
brew install create-dmg
mkdir -p dist_dmg
create-dmg \
--volname "QtTinySA (${{ matrix.arch }})" \
--window-pos 200 120 \
--window-size 600 400 \
--icon-size 100 \
--icon "QtTinySA.app" 180 130 \
--hide-extension "QtTinySA.app" \
--app-drop-link 400 130 \
"dist_dmg/QtTinySA_mac_${{ matrix.arch }}.dmg" \
"src/dist/QtTinySA.app"
- name: Upload DMG artifact
uses: actions/upload-artifact@v4
with:
name: QtTinySA_mac_${{ matrix.arch }}.dmg
path: dist_dmg/QtTinySA_mac_${{ matrix.arch }}.dmg