revert action build #32
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 Installers | |
| on: | |
| # Manual trigger from GitHub Actions UI | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: "Version tag (e.g. v1.0.6)" | |
| required: false | |
| default: "" | |
| # Auto-trigger on version tags | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| # ── Windows MSI ────────────────────────────────────────────── | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install Briefcase | |
| run: pip install briefcase | |
| - name: Create Briefcase project | |
| run: briefcase create windows | |
| - name: Build Windows app | |
| run: briefcase build windows | |
| - name: Package as MSI | |
| run: briefcase package windows -p msi --adhoc-sign | |
| - name: Upload MSI artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: AbletonHub-Windows-MSI | |
| path: dist/*.msi | |
| if-no-files-found: error | |
| # ── macOS DMG ──────────────────────────────────────────────── | |
| build-macos: | |
| runs-on: macos-latest | |
| env: | |
| APPLE_ID: ${{ secrets.APP_ID }} | |
| APPLE_TEAM_ID: ${{ secrets.APP_TEAM_ID }} | |
| APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APP_PASSWORD }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Import code signing certificate | |
| env: | |
| APP_CERT: ${{ secrets.APP_CERT }} | |
| APP_CERT_PASSWORD: ${{ secrets.APP_CERT_PASSWORD }} | |
| KEYCHAIN_PASSWORD: ${{ secrets.APP_CERT_PASSWORD }} | |
| run: | | |
| KEYCHAIN_PATH=$RUNNER_TEMP/signing.keychain-db | |
| CERT_PATH=$RUNNER_TEMP/certificate.p12 | |
| echo "$APP_CERT" | base64 -D > "$CERT_PATH" | |
| security create-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH" | |
| security set-keychain-settings -lut 21600 "$KEYCHAIN_PATH" | |
| security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH" | |
| security import "$CERT_PATH" -P "$APP_CERT_PASSWORD" -A -t cert -f pkcs12 -k "$KEYCHAIN_PATH" | |
| security list-keychain -d user -s "$KEYCHAIN_PATH" | |
| - name: Store notarytool credentials | |
| env: | |
| KEYCHAIN_PASSWORD: ${{ secrets.APP_CERT_PASSWORD }} | |
| run: | | |
| security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$RUNNER_TEMP/signing.keychain-db" | |
| xcrun notarytool store-credentials "AC_PASSWORD" \ | |
| --apple-id "$APPLE_ID" \ | |
| --team-id "$APPLE_TEAM_ID" \ | |
| --password "$APPLE_APP_SPECIFIC_PASSWORD" \ | |
| --keychain "$RUNNER_TEMP/signing.keychain-db" | |
| - name: Set up Python 3.13 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - name: Generate macOS .icns icon | |
| run: | | |
| # Generate .icns from the PNG icon using macOS sips + iconutil | |
| SRC_PNG="resources/icons/AProject.png" | |
| ICONSET_DIR="resources/icons/AProject.iconset" | |
| mkdir -p "$ICONSET_DIR" | |
| # Generate required icon sizes (sips handles upscaling if source is smaller) | |
| for size in 16 32 64 128 256 512; do | |
| sips -z $size $size "$SRC_PNG" --out "$ICONSET_DIR/icon_${size}x${size}.png" 2>/dev/null || true | |
| done | |
| # Retina variants | |
| sips -z 32 32 "$SRC_PNG" --out "$ICONSET_DIR/icon_16x16@2x.png" 2>/dev/null || true | |
| sips -z 64 64 "$SRC_PNG" --out "$ICONSET_DIR/icon_32x32@2x.png" 2>/dev/null || true | |
| sips -z 256 256 "$SRC_PNG" --out "$ICONSET_DIR/icon_128x128@2x.png" 2>/dev/null || true | |
| sips -z 512 512 "$SRC_PNG" --out "$ICONSET_DIR/icon_256x256@2x.png" 2>/dev/null || true | |
| # Convert iconset to .icns | |
| iconutil -c icns "$ICONSET_DIR" -o "resources/icons/AProject.icns" || echo "Warning: .icns generation failed, Briefcase will use default icon" | |
| - name: Install Briefcase | |
| run: pip install "briefcase>=0.3.22" | |
| - name: Verify Briefcase version | |
| run: briefcase --version | |
| - name: Create Briefcase project | |
| run: briefcase create macOS | |
| - name: Build macOS app | |
| run: briefcase build macOS | |
| - name: Package as DMG | |
| run: briefcase package macOS -p dmg --no-notarize --identity '${{ secrets.APP_IDENTITY }}' | |
| - name: Notarize DMG | |
| env: | |
| KEYCHAIN_PASSWORD: ${{ secrets.APP_CERT_PASSWORD }} | |
| run: | | |
| security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$RUNNER_TEMP/signing.keychain-db" | |
| DMG_PATH=$(ls dist/*.dmg | head -1) | |
| # Submit without --wait to avoid network timeout during long poll | |
| SUBMIT_OUTPUT=$(xcrun notarytool submit "$DMG_PATH" \ | |
| --keychain-profile "AC_PASSWORD" \ | |
| --keychain "$RUNNER_TEMP/signing.keychain-db") | |
| SUBMISSION_ID=$(echo "$SUBMIT_OUTPUT" | awk '/id: / { print $2; exit }') | |
| echo "Submission ID: $SUBMISSION_ID" | |
| # Wait for completion with retries (Apple's servers can be slow/unreachable) | |
| for attempt in 1 2 3 4 5 6 7 8 9 10; do | |
| if xcrun notarytool wait "$SUBMISSION_ID" \ | |
| --keychain-profile "AC_PASSWORD" \ | |
| --keychain "$RUNNER_TEMP/signing.keychain-db" \ | |
| --timeout 15m; then | |
| echo "Notarization completed successfully" | |
| exit 0 | |
| fi | |
| echo "Attempt $attempt failed (possible network error), retrying in 60s..." | |
| sleep 60 | |
| done | |
| echo "Notarization did not complete after 10 attempts" | |
| exit 1 | |
| - name: Staple notarization to DMG | |
| run: | | |
| DMG_PATH=$(ls dist/*.dmg | head -1) | |
| xcrun stapler staple "$DMG_PATH" | |
| - name: Upload DMG artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: AbletonHub-macOS-DMG | |
| path: dist/*.dmg | |
| if-no-files-found: error | |
| # ── Create GitHub Release (only on tag push) ───────────────── | |
| release: | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| needs: [build-windows, build-macos] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| AbletonHub-Windows-MSI/**/*.msi | |
| AbletonHub-macOS-DMG/**/*.dmg | |
| generate_release_notes: true | |
| draft: true |