#647 github workflows related #32
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 PyInstaller Build | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- name: Install project requirements | |
run: | | |
python -m pip install --upgrade pip | |
pip install pyinstaller | |
pip install -r requirements.txt | |
git clone https://github.com/ktechhydle/mp_software_stylesheets.git | |
- name: Build macOS app using PyInstaller | |
run: | | |
pyinstaller macos_build.spec | |
- name: Install create-dmg using Homebrew | |
run: | | |
brew install create-dmg | |
- name: Codesign the app | |
run: | | |
codesign --deep --force --sign - dist/MPRUN.app | |
- name: Create DMG | |
run: | | |
create-dmg --volname "MPRUN Installer" \ | |
--background "dmg installer background.png" \ | |
--window-pos 20 20 --window-size 600 400 --icon-size 128 \ | |
--icon "MPRUN.app" 75 176 --hide-extension "MPRUN.app" \ | |
--app-drop-link 438 176 "MPRUN_1.1+macOS_setup.dmg" \ | |
"dist/" | |
- name: Codesign the dmg | |
run: | | |
codesign --deep --force --sign - MPRUN_1.1+macOS_setup.dmg | |
- name: Upload DMG as artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: MPRUN_1.1+macOS_setup.dmg | |
path: MPRUN_1.1+macOS_setup.dmg |