fix: macOS build failing

This commit is contained in:
LukeGus
2025-10-24 20:38:20 -05:00
parent d587c4f2a0
commit 836b91e8c0

View File

@@ -221,11 +221,11 @@ jobs:
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: "20" node-version: "20"
cache: "npm"
- name: Install dependencies - name: Install dependencies
run: | run: |
rm -f package-lock.json npm ci
npm install
npm install --force @rollup/rollup-darwin-arm64 npm install --force @rollup/rollup-darwin-arm64
- name: Check for Code Signing Certificates - name: Check for Code Signing Certificates
@@ -282,11 +282,7 @@ 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 Vite Frontend - name: Build macOS Packages
run: npm run build
- 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: |
@@ -297,15 +293,14 @@ 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 MAS only with custom buildVersion (frontend already built) # Build both MAS and DMG in a single command to avoid running build twice
npx electron-builder --mac mas --universal --config.buildVersion="$BUILD_VERSION" if [ "${{ steps.check_certs.outputs.has_certs }}" == "true" ]; then
# Build MAS and DMG with custom buildVersion
- name: Build macOS DMG (All Architectures) npm run build && npx electron-builder --mac --universal --x64 --arm64 --config.buildVersion="$BUILD_VERSION"
env: else
ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES: true # Build only DMG (no certs for MAS)
run: | npm run build && npx electron-builder --mac dmg --universal --x64 --arm64
# Build DMG for all architectures (frontend already built, doesn't require signing) fi
npx electron-builder --mac dmg --universal --x64 --arm64
- name: List release directory - name: List release directory
if: steps.check_certs.outputs.has_certs == 'true' if: steps.check_certs.outputs.has_certs == 'true'