Bibliogon v0.20.0 #10
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: Launcher (macOS) | |
| # Builds the macOS .app bundle launcher and publishes a SHA256 checksum | |
| # next to it. Runs on: | |
| # - push to main when launcher/ changes (smoke build, uploads an | |
| # artifact to the workflow run for download + manual verification) | |
| # - release tag v*.*.* (attaches the ZIP + checksum to the GitHub | |
| # release as release assets) | |
| # | |
| # Parallels launcher-windows.yml and launcher-linux.yml. The launcher | |
| # source code is platform-agnostic; only the spec file's BUNDLE block | |
| # is macOS-specific. | |
| # | |
| # arm64 only for initial D-02 (macos-14 runner = Apple Silicon). Intel | |
| # Mac support would require universal2 builds or a separate macos-13 | |
| # job - deferred until users request it. | |
| # | |
| # Unsigned binary: first launch requires right-click -> Open to bypass | |
| # Gatekeeper. Code signing requires an Apple Developer account and is | |
| # out of scope for the initial D-02. | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "launcher/**" | |
| - ".github/workflows/launcher-macos.yml" | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - "launcher/**" | |
| - ".github/workflows/launcher-macos.yml" | |
| release: | |
| types: [created] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| name: Build launcher .app bundle | |
| runs-on: macos-14 # Apple Silicon (arm64) | |
| defaults: | |
| run: | |
| working-directory: launcher | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install Poetry | |
| run: pip install poetry | |
| - name: Install launcher dependencies | |
| run: poetry install --no-interaction --no-ansi | |
| - name: Run launcher unit tests | |
| run: poetry run pytest tests/ -v | |
| - name: Regenerate placeholder icon (PNG frames via Pillow) | |
| run: poetry run python scripts/make_icon.py | |
| - name: Convert placeholder icon to .icns (macOS-only iconutil) | |
| # bibliogon.ico is multi-size; make_icns.py extracts the largest | |
| # frame, resamples to the standard .icns size set, and invokes | |
| # iconutil. iconutil is macOS-only so this step does not run on | |
| # Linux/Windows builds. | |
| run: poetry run python scripts/make_icns.py | |
| - name: Build .app bundle | |
| run: poetry run pyinstaller bibliogon-launcher.spec --clean --noconfirm | |
| - name: Zip .app bundle | |
| # Notarization / distribution expect the .app inside a ZIP or DMG. | |
| # We ship ZIP only for initial D-02 to keep the pipeline simple. | |
| run: | | |
| cd dist | |
| zip -r bibliogon-launcher-macos.zip "Bibliogon Launcher.app" | |
| - name: Compute SHA256 checksum | |
| run: | | |
| cd dist | |
| hash=$(shasum -a 256 bibliogon-launcher-macos.zip | awk '{print $1}') | |
| echo "$hash bibliogon-launcher-macos.zip" > bibliogon-launcher-macos.zip.sha256 | |
| echo "SHA256: $hash" | |
| - name: Upload smoke artifact (push / PR / dispatch) | |
| if: github.event_name != 'release' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: bibliogon-launcher-macos | |
| path: | | |
| launcher/dist/bibliogon-launcher-macos.zip | |
| launcher/dist/bibliogon-launcher-macos.zip.sha256 | |
| if-no-files-found: error | |
| retention-days: 14 | |
| - name: Attach to release (tag push) | |
| if: github.event_name == 'release' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| launcher/dist/bibliogon-launcher-macos.zip | |
| launcher/dist/bibliogon-launcher-macos.zip.sha256 | |
| fail_on_unmatched_files: true |