diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a221534d8..5fd74a161 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,8 +28,20 @@ jobs: AC_APIKEY_ID: ${{ secrets.AC_APIKEY_ID }} AC_APIKEY_ISSUER_ID: ${{ secrets.AC_APIKEY_ISSUER_ID }} + - name: Verify signing setup + run: | + if [ -n "${CSC_LINK:-}" ]; then + echo "✅ Code signing enabled" + security list-keychains -d user + security find-identity -v -p codesigning + else + echo "⚠️ Code signing NOT enabled" + fi + - name: Package for macOS run: make dist-mac + env: + CSC_FOR_PULL_REQUEST: ${{ github.event.pull_request.number == 234 }} - name: Upload macOS DMG (x64) uses: actions/upload-artifact@v4 diff --git a/Makefile b/Makefile index c1fd69737..0e1e5970a 100644 --- a/Makefile +++ b/Makefile @@ -162,18 +162,30 @@ dist: build ## Build distributable packages @bun x electron-builder --publish never # Parallel macOS builds - notarization happens concurrently -dist-mac: build ## Build macOS distributables (x64 + arm64 in parallel) - @echo "Building macOS architectures in parallel..." - @bun x electron-builder --mac --x64 --publish never & \ - bun x electron-builder --mac --arm64 --publish never & \ - wait +dist-mac: build ## Build macOS distributables (x64 + arm64) + @if [ -n "$$CSC_LINK" ]; then \ + echo "🔐 Code signing enabled - building sequentially to avoid keychain conflicts..."; \ + bun x electron-builder --mac --x64 --publish never && \ + bun x electron-builder --mac --arm64 --publish never; \ + else \ + echo "Building macOS architectures in parallel..."; \ + bun x electron-builder --mac --x64 --publish never & pid1=$$! ; \ + bun x electron-builder --mac --arm64 --publish never & pid2=$$! ; \ + wait $$pid1 && wait $$pid2; \ + fi @echo "✅ Both architectures built successfully" -dist-mac-release: build ## Build and publish macOS distributables (x64 + arm64 in parallel) - @echo "Building and publishing macOS architectures in parallel..." - @bun x electron-builder --mac --x64 --publish always & \ - bun x electron-builder --mac --arm64 --publish always & \ - wait +dist-mac-release: build ## Build and publish macOS distributables (x64 + arm64) + @if [ -n "$$CSC_LINK" ]; then \ + echo "🔐 Code signing enabled - building sequentially to avoid keychain conflicts..."; \ + bun x electron-builder --mac --x64 --publish always && \ + bun x electron-builder --mac --arm64 --publish always; \ + else \ + echo "Building and publishing macOS architectures in parallel..."; \ + bun x electron-builder --mac --x64 --publish always & pid1=$$! ; \ + bun x electron-builder --mac --arm64 --publish always & pid2=$$! ; \ + wait $$pid1 && wait $$pid2; \ + fi @echo "✅ Both architectures built and published successfully" dist-mac-x64: build ## Build macOS x64 distributable only