v1.4.2 — Wider inspector panel (19% screen width) #6
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 macOS | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| upload_to_release: | |
| description: 'Upload artifacts to a release tag (leave blank to skip)' | |
| required: false | |
| default: '' | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - runner: macos-14 | |
| arch: arm64 | |
| asset: HbBuilder-macos-arm64.zip | |
| - runner: macos-13 | |
| arch: x86_64 | |
| asset: HbBuilder-macos-x86_64.zip | |
| runs-on: ${{ matrix.runner }} | |
| name: Build (${{ matrix.arch }}) | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install brew deps | |
| run: | | |
| brew update >/dev/null || true | |
| brew install mysql-client libpq || true | |
| - name: Cache Harbour | |
| id: cache-harbour | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/harbour | |
| key: harbour-${{ matrix.arch }}-v1 | |
| - name: Build Harbour (if cache miss) | |
| if: steps.cache-harbour.outputs.cache-hit != 'true' | |
| run: | | |
| git clone --depth 1 https://github.com/harbour/core /tmp/harbour-src | |
| cd /tmp/harbour-src | |
| HB_INSTALL_PREFIX="$HOME/harbour" make -j$(sysctl -n hw.ncpu) install | |
| - name: Cache Scintilla build | |
| uses: actions/cache@v4 | |
| with: | |
| path: resources/scintilla_src/build | |
| key: scintilla-${{ matrix.arch }}-v1-${{ hashFiles('resources/scintilla_src/build_scintilla_mac.sh') }} | |
| - name: Build HbBuilder | |
| env: | |
| HBDIR: ${{ github.workspace }}/../harbour | |
| run: | | |
| export HBDIR="$HOME/harbour" | |
| ./build_mac.sh | |
| - name: Verify binary architecture | |
| run: | | |
| BIN="bin/HbBuilder.app/Contents/MacOS/HbBuilder" | |
| ARCH=$(lipo -archs "$BIN") | |
| echo "Built arch: $ARCH (expected ${{ matrix.arch }})" | |
| echo "$ARCH" | grep -qw "${{ matrix.arch }}" | |
| # --- Signing & Notarization --- | |
| # Requires these GitHub repository secrets: | |
| # APPLE_CERTIFICATE_BASE64 — Developer ID Application cert (.p12 → base64) | |
| # APPLE_CERTIFICATE_PASSWORD — .p12 export password | |
| # APPLE_ID — your Apple ID email | |
| # APPLE_APP_PASSWORD — app-specific password (appleid.apple.com) | |
| # APPLE_TEAM_ID — 10-char team ID (developer.apple.com) | |
| - name: Import signing certificate | |
| if: env.APPLE_CERTIFICATE_BASE64 != '' | |
| env: | |
| APPLE_CERTIFICATE_BASE64: ${{ secrets.APPLE_CERTIFICATE_BASE64 }} | |
| APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
| run: | | |
| KEYCHAIN_PATH="$RUNNER_TEMP/signing.keychain-db" | |
| KEYCHAIN_PASSWORD="$(openssl rand -hex 16)" | |
| security create-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH" | |
| security set-keychain-settings -lut 21600 "$KEYCHAIN_PATH" | |
| security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH" | |
| echo "$APPLE_CERTIFICATE_BASE64" | base64 --decode > "$RUNNER_TEMP/cert.p12" | |
| security import "$RUNNER_TEMP/cert.p12" \ | |
| -k "$KEYCHAIN_PATH" \ | |
| -P "$APPLE_CERTIFICATE_PASSWORD" \ | |
| -T /usr/bin/codesign | |
| security list-keychain -d user -s "$KEYCHAIN_PATH" | |
| security set-key-partition-list \ | |
| -S apple-tool:,apple: \ | |
| -s -k "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH" | |
| rm -f "$RUNNER_TEMP/cert.p12" | |
| - name: Sign app | |
| if: env.APPLE_CERTIFICATE_BASE64 != '' | |
| env: | |
| APPLE_CERTIFICATE_BASE64: ${{ secrets.APPLE_CERTIFICATE_BASE64 }} | |
| APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
| run: | | |
| IDENTITY=$(security find-identity -v -p codesigning \ | |
| | grep "Developer ID Application" \ | |
| | head -1 | sed 's/.*"\(.*\)"/\1/') | |
| echo "Signing with: $IDENTITY" | |
| codesign --deep --force --options runtime \ | |
| --entitlements resources/HbBuilder.entitlements \ | |
| --sign "$IDENTITY" \ | |
| --timestamp \ | |
| bin/HbBuilder.app | |
| codesign --verify --deep --strict bin/HbBuilder.app | |
| echo "Signature OK" | |
| - name: Notarize app | |
| if: env.APPLE_CERTIFICATE_BASE64 != '' | |
| env: | |
| APPLE_CERTIFICATE_BASE64: ${{ secrets.APPLE_CERTIFICATE_BASE64 }} | |
| APPLE_ID: ${{ secrets.APPLE_ID }} | |
| APPLE_APP_PASSWORD: ${{ secrets.APPLE_APP_PASSWORD }} | |
| APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
| run: | | |
| ditto -c -k --keepParent bin/HbBuilder.app /tmp/HbBuilder-notarize.zip | |
| xcrun notarytool submit /tmp/HbBuilder-notarize.zip \ | |
| --apple-id "$APPLE_ID" \ | |
| --password "$APPLE_APP_PASSWORD" \ | |
| --team-id "$APPLE_TEAM_ID" \ | |
| --wait | |
| xcrun stapler staple bin/HbBuilder.app | |
| xcrun stapler validate bin/HbBuilder.app | |
| rm -f /tmp/HbBuilder-notarize.zip | |
| echo "Notarization and stapling complete" | |
| # --- Package --- | |
| - name: Package | |
| run: | | |
| cd bin | |
| rm -f HbBuilder.app/Contents/hbbuilder.ini | |
| rm -rf HbBuilder.app/Contents/.git | |
| ditto -c -k --keepParent HbBuilder.app "../${{ matrix.asset }}" | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.asset }} | |
| path: ${{ matrix.asset }} | |
| - name: Upload to release (on release event) | |
| if: github.event_name == 'release' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: ${{ matrix.asset }} | |
| - name: Upload to release (manual dispatch) | |
| if: github.event_name == 'workflow_dispatch' && inputs.upload_to_release != '' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ inputs.upload_to_release }} | |
| files: ${{ matrix.asset }} |