Skip to content

Add macOS build workflow for creating and releasing the macOS executable #1

Add macOS build workflow for creating and releasing the macOS executable

Add macOS build workflow for creating and releasing the macOS executable #1

Workflow file for this run

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/*