Add macOS build workflow for creating and releasing the macOS executable #1
Workflow file for this run
This file contains hidden or 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: Build macOS Executable | |
| on: | |
| push: | |
| tags: | |
| - 'macos_v*' | |
| permissions: | |
| contents: write # required to upload release assets | |
| jobs: | |
| build-macos: | |
| 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.12" | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pyinstaller | |
| pip install ultralytics sentence-transformers opencv-python pillow tqdm rich sqlite-vec rembg onnxruntime sqlean.py | |
| - name: Build macOS executable with PyInstaller | |
| run: | | |
| pyinstaller \ | |
| --onefile \ | |
| --windowed \ | |
| --name philately_tool_gui \ | |
| --hidden-import sqlite_vec \ | |
| --add-data "model.pt:." \ | |
| philately_tool_gui.py \ | |
| --distpath dist \ | |
| --workpath build | |
| - name: Verify dist folder | |
| run: | | |
| ls -lh dist | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: Release ${{ github.ref_name }} | |
| files: dist/* |