Release v0.4.6 — update badge on all platforms #15
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: macOS | |
| on: | |
| push: | |
| tags: ['v*'] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| name: Build macOS .dmg (Apple Silicon) | |
| runs-on: macos-14 # Apple Silicon. GitHub no longer offers free Intel | |
| steps: # (macos-13) runners, so Intel users build from source. | |
| - uses: actions/checkout@v4 | |
| - name: Install GTK/GStreamer (Homebrew) | |
| run: | | |
| brew update | |
| brew install gtk4 pygobject3 gstreamer \ | |
| gst-plugins-base gst-plugins-good gst-plugins-bad \ | |
| adwaita-icon-theme librsvg create-dmg | |
| # gst-plugins-bad provides the 'speed' element (cassette varispeed); | |
| # Homebrew's bad build lacks soundtouch, but 'speed' has no extra dep. | |
| - name: Python env (sees Homebrew gi, builds the bundle) | |
| run: | | |
| PYBIN="$(brew --prefix)/bin/python3" | |
| "$PYBIN" -m venv --system-site-packages venv | |
| source venv/bin/activate | |
| python -c "import gi; gi.require_version('Gtk','4.0'); from gi.repository import Gtk, Gst; print('gi OK')" | |
| pip install --upgrade pip | |
| pip install pyinstaller pyinstaller-hooks-contrib numpy . | |
| - name: Build .icns from the logo | |
| run: | | |
| rsvg-convert -w 1024 -h 1024 assets/easyamp-logo.svg -o /tmp/ea1024.png | |
| mkdir -p EasyAmp.iconset | |
| for s in 16 32 128 256 512; do | |
| sips -z $s $s /tmp/ea1024.png --out EasyAmp.iconset/icon_${s}x${s}.png | |
| sips -z $((s*2)) $((s*2)) /tmp/ea1024.png --out EasyAmp.iconset/icon_${s}x${s}@2x.png | |
| done | |
| iconutil -c icns EasyAmp.iconset -o packaging/macos/easyamp.icns | |
| - name: Build the .app | |
| run: | | |
| source venv/bin/activate | |
| cd packaging/macos | |
| pyinstaller --noconfirm --clean EasyAmp.spec | |
| - name: Verify GTK got bundled | |
| run: | | |
| APP=packaging/macos/dist/EasyAmp.app | |
| echo "Gtk typelib: $(find "$APP" -iname 'Gtk-4.0.typelib' | head -1 || echo MISSING)" | |
| echo "libgtk dylib: $(find "$APP" -iname 'libgtk-4*' | head -1 || echo MISSING)" | |
| echo "varispeed (speed) plugin: $(find "$APP" -iname '*libgstspeed*' | head -1 || echo MISSING)" | |
| test -n "$(find "$APP" -iname 'Gtk-4.0.typelib')" || { echo 'ERROR: Gtk typelib missing'; exit 1; } | |
| - name: Ad-hoc code-sign the .app | |
| run: | | |
| # PyInstaller rewrites the bundled dylibs' load paths, which | |
| # invalidates their signatures; on Apple Silicon the OS then kills | |
| # the app at launch. A deep ad-hoc re-sign makes it launchable | |
| # without a paid Developer ID (users still clear Gatekeeper once). | |
| APP=packaging/macos/dist/EasyAmp.app | |
| codesign --remove-signature "$APP" 2>/dev/null || true | |
| codesign --force --deep --sign - --timestamp=none "$APP" | |
| codesign --verify --deep --strict --verbose=2 "$APP" || true | |
| - name: Package the .dmg | |
| run: | | |
| create-dmg \ | |
| --volname "EasyAmp" \ | |
| --window-size 540 360 \ | |
| --icon-size 96 \ | |
| --app-drop-link 380 170 \ | |
| --icon "EasyAmp.app" 150 170 \ | |
| "EasyAmp-macos-arm64.dmg" \ | |
| "packaging/macos/dist/EasyAmp.app" || \ | |
| create-dmg "EasyAmp-macos-arm64.dmg" "packaging/macos/dist/EasyAmp.app" | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: EasyAmp-macos-arm64 | |
| path: EasyAmp-macos-arm64.dmg | |
| - name: Attach to release | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: EasyAmp-macos-arm64.dmg |