fix: macOS build failing
This commit is contained in:
18
.github/workflows/electron-build.yml
vendored
18
.github/workflows/electron-build.yml
vendored
@@ -282,7 +282,8 @@ jobs:
|
|||||||
echo "Imported certificates:"
|
echo "Imported certificates:"
|
||||||
security find-identity -v -p codesigning $KEYCHAIN_PATH
|
security find-identity -v -p codesigning $KEYCHAIN_PATH
|
||||||
|
|
||||||
- name: Build macOS Packages
|
- name: Build macOS App Store Package
|
||||||
|
if: steps.check_certs.outputs.has_certs == 'true'
|
||||||
env:
|
env:
|
||||||
ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES: true
|
ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES: true
|
||||||
run: |
|
run: |
|
||||||
@@ -293,12 +294,19 @@ jobs:
|
|||||||
echo "✅ Package version: $CURRENT_VERSION (unchanged)"
|
echo "✅ Package version: $CURRENT_VERSION (unchanged)"
|
||||||
echo "✅ Build number for Apple: $BUILD_VERSION"
|
echo "✅ Build number for Apple: $BUILD_VERSION"
|
||||||
|
|
||||||
# Build both MAS and DMG in a single command to avoid running build twice
|
# Build MAS with custom buildVersion
|
||||||
|
npm run build && npx electron-builder --mac mas --universal --config.buildVersion="$BUILD_VERSION"
|
||||||
|
|
||||||
|
- name: Build macOS DMG
|
||||||
|
env:
|
||||||
|
ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES: true
|
||||||
|
run: |
|
||||||
|
# Build DMG without running npm run build again (already built above or skip if no certs)
|
||||||
if [ "${{ steps.check_certs.outputs.has_certs }}" == "true" ]; then
|
if [ "${{ steps.check_certs.outputs.has_certs }}" == "true" ]; then
|
||||||
# Build MAS and DMG with custom buildVersion
|
# Frontend already built, just package DMG
|
||||||
npm run build && npx electron-builder --mac --universal --x64 --arm64 --config.buildVersion="$BUILD_VERSION"
|
npx electron-builder --mac dmg --universal --x64 --arm64
|
||||||
else
|
else
|
||||||
# Build only DMG (no certs for MAS)
|
# No certs, need to build frontend first
|
||||||
npm run build && npx electron-builder --mac dmg --universal --x64 --arm64
|
npm run build && npx electron-builder --mac dmg --universal --x64 --arm64
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user