Skip to content

feat(mac): build macOS native .app bundle, add detailed debug console UI #4

feat(mac): build macOS native .app bundle, add detailed debug console UI

feat(mac): build macOS native .app bundle, add detailed debug console UI #4

Workflow file for this run

name: Build macOS App
on:
push:
branches: [ "main", "master" ]
workflow_dispatch: # 允许手动触发打包
jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install PyInstaller
run: |
python -m pip install --upgrade pip
pip install pyinstaller
- name: Compile Swift Helper
working-directory: ./Mac
run: |
# 编译 Swift 脚本为可执行的二进制文件
swiftc nowplaying.swift -o mac_nowplaying
chmod +x mac_nowplaying
- name: Build with PyInstaller
working-directory: ./Mac
run: |
# 使用 --windowed 打包成 macOS 标准的 .app 应用程序包
pyinstaller --windowed --add-binary "mac_nowplaying:." sender.py
# 压缩 .app 以防 GitHub Actions 上传时吞掉顶层目录
cd dist
zip -ry Mac-Sender.zip sender.app
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: Mac-Sender-App
path: Mac/dist/Mac-Sender.zip