Skip to content

Build macOS Release #23

Build macOS Release

Build macOS Release #23

Workflow file for this run

name: Build macOS Release
on:
release:
types: [created]
workflow_dispatch:
inputs:
version:
description: 'Version tag (e.g., v0.1.0)'
required: true
default: 'v0.1.0-macos'
permissions:
contents: write
packages: write
jobs:
build-macos:
name: Build macOS Application
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Display Python version
run: python --version
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements_ace_macos.txt
pip install rotary_embedding_torch
- name: Install audio-separator (no deps)
run: |
pip install "audio-separator==0.40.0" --no-deps
- name: Install py3langid (no deps)
run: |
pip install "py3langid==0.3.0" --no-deps
- name: Install ACE-Step (no deps)
run: |
pip install "git+https://github.com/ace-step/ACE-Step.git" --no-deps
- name: Install PyInstaller
run: |
pip install pyinstaller==6.17.0
- name: Build with PyInstaller
run: |
pyinstaller CDMF.spec
- name: Add terminal launcher script to app bundle
run: |
# Copy the launcher script into the MacOS directory of the app bundle
cp launch_in_terminal.sh dist/AceForge.app/Contents/MacOS/
chmod +x dist/AceForge.app/Contents/MacOS/launch_in_terminal.sh
# Copy and set up the terminal launcher wrapper as the main "AceForge" executable
cp macos_terminal_launcher.sh dist/AceForge.app/Contents/MacOS/AceForge
chmod +x dist/AceForge.app/Contents/MacOS/AceForge
- name: Code sign the app bundle
run: |
# Run the code signing script with ad-hoc signing (no certificate required for dev builds)
# This prevents the "app is damaged" warning that requires sudo xattr -cr
# For production releases, set MACOS_SIGNING_IDENTITY secret to your Developer ID
chmod +x build/macos/codesign.sh
./build/macos/codesign.sh dist/AceForge.app
env:
MACOS_SIGNING_IDENTITY: ${{ secrets.MACOS_SIGNING_IDENTITY || '-' }}
- name: Create DMG (macOS disk image)
run: |
# Create a temporary directory for DMG contents
mkdir -p dmg_temp
cp -R dist/AceForge.app dmg_temp/
# Copy the .command file for easy launching
cp AceForge.command dmg_temp/
chmod +x dmg_temp/AceForge.command
# Create Applications symlink for easy drag-and-drop install
ln -s /Applications dmg_temp/Applications
# Copy README for users
cp .github/DMG_README.txt dmg_temp/README.txt
# Create DMG
hdiutil create -volname "AceForge" \
-srcfolder dmg_temp \
-ov -format UDZO \
AceForge-macOS.dmg
- name: Create ZIP archive (alternative distribution)
run: |
cd dist
zip -r ../AceForge-macOS.zip AceForge.app
cd ..
- name: Calculate checksums
run: |
shasum -a 256 AceForge-macOS.dmg > checksums.txt
shasum -a 256 AceForge-macOS.zip >> checksums.txt
cat checksums.txt
- name: Upload DMG artifact
uses: actions/upload-artifact@v4
with:
name: AceForge-macOS-DMG
path: AceForge-macOS.dmg
- name: Upload ZIP artifact
uses: actions/upload-artifact@v4
with:
name: AceForge-macOS-ZIP
path: AceForge-macOS.zip
- name: Upload checksums
uses: actions/upload-artifact@v4
with:
name: checksums
path: checksums.txt
- name: Upload to Release (if triggered by release)
if: github.event_name == 'release'
uses: softprops/action-gh-release@v1
with:
files: |
AceForge-macOS.dmg
AceForge-macOS.zip
checksums.txt