name: Build binaries # Builds standalone, no-Python-needed binaries for macOS, Linux, and Windows # and attaches them to the GitHub Release. Trigger by pushing a tag like v1.4.83 # (or run manually from the Actions tab). on: push: tags: - "v*" workflow_dispatch: permissions: contents: write jobs: build: name: ${{ matrix.label }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: include: - os: macos-14 # Apple Silicon label: macos-arm64 asset: yourmemory-macos-arm64 - os: macos-13 # Intel label: macos-x86_64 asset: yourmemory-macos-x86_64 - os: ubuntu-latest label: linux-x86_64 asset: yourmemory-linux-x86_64 - os: windows-latest label: windows-x86_64 asset: yourmemory-windows-x86_64.exe steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: "3.12" - name: Install app + PyInstaller + spaCy model run: | python -m pip install --upgrade pip pip install -e . pip install pyinstaller python -m spacy download en_core_web_sm - name: Build binary (bundles all deps + models) run: pyinstaller yourmemory.spec --noconfirm --clean - name: Package artifact (compress + preserve exec bit) shell: bash run: | mkdir -p out if [ "${{ runner.os }}" = "Windows" ]; then mv dist/yourmemory.exe "${{ matrix.asset }}" 7z a "out/${{ matrix.asset }}.zip" "${{ matrix.asset }}" else mv dist/yourmemory "${{ matrix.asset }}" chmod +x "${{ matrix.asset }}" # store exec bit inside the archive so downloads stay runnable tar -czf "out/${{ matrix.asset }}.tar.gz" "${{ matrix.asset }}" fi - name: Upload workflow artifact uses: actions/upload-artifact@v4 with: name: ${{ matrix.asset }} path: out/* - name: Attach to release if: startsWith(github.ref, 'refs/tags/') uses: softprops/action-gh-release@v2 with: files: out/*