diff --git a/.github/workflows/electron-build.yml b/.github/workflows/electron-build.yml index e510460c..54510bb2 100644 --- a/.github/workflows/electron-build.yml +++ b/.github/workflows/electron-build.yml @@ -94,51 +94,6 @@ jobs: retention-days: 30 build-macos: - runs-on: macos-latest - if: github.event.inputs.build_type == 'all' || github.event.inputs.build_type == 'macos' || github.event.inputs.build_type == '' - - steps: - - name: Checkout repository - uses: actions/checkout@v5 - with: - fetch-depth: 1 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: "20" - - - name: Install dependencies - run: | - rm -f package-lock.json - npm install - npm install --force @rollup/rollup-darwin-arm64 - - - name: Build macOS DMG - run: npm run build:mac-dmg - env: - CSC_IDENTITY_AUTO_DISCOVERY: false - - - name: Build macOS Zip - run: npm run build:mac-zip - env: - CSC_IDENTITY_AUTO_DISCOVERY: false - - - name: Upload macOS DMG Artifact - uses: actions/upload-artifact@v4 - with: - name: Termix-macOS-DMG - path: release/*.dmg - retention-days: 30 - - - name: Upload macOS Zip Artifact - uses: actions/upload-artifact@v4 - with: - name: Termix-macOS-Zip - path: release/*.zip - retention-days: 30 - - build-macos-mas: runs-on: macos-latest if: github.event.inputs.build_type == 'macos' || github.event.inputs.build_type == 'all' needs: [] @@ -191,7 +146,7 @@ jobs: - name: Build macOS App Store Package if: steps.check_certs.outputs.has_certs == 'true' - run: npm run build:mac-mas + run: npm run build:mac env: APPLE_ID: ${{ secrets.APPLE_ID }} APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }} diff --git a/build/entitlements.mac.plist b/build/entitlements.mac.plist deleted file mode 100644 index 341d88b4..00000000 --- a/build/entitlements.mac.plist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - com.apple.security.cs.allow-jit - - com.apple.security.cs.allow-unsigned-executable-memory - - com.apple.security.cs.disable-library-validation - - com.apple.security.cs.allow-dyld-environment-variables - - com.apple.security.network.client - - com.apple.security.network.server - - com.apple.security.files.user-selected.read-write - - - diff --git a/build/notarize.cjs b/build/notarize.cjs deleted file mode 100644 index bc35f4cb..00000000 --- a/build/notarize.cjs +++ /dev/null @@ -1,49 +0,0 @@ -const { notarize } = require('@electron/notarize'); - -exports.default = async function notarizing(context) { - const { electronPlatformName, appOutDir, packager } = context; - - // Skip notarization for non-macOS platforms - if (electronPlatformName !== 'darwin') { - return; - } - - // Skip notarization for Mac App Store builds (MAS) - // MAS builds are notarized by Apple during App Store review - const target = packager.platformSpecificBuildOptions.target || []; - const isMasBuild = Array.isArray(target) - ? target.some(t => t.target === 'mas' || t === 'mas') - : target === 'mas'; - - if (isMasBuild || appOutDir.includes('mas')) { - console.log('Skipping notarization for Mac App Store build'); - return; - } - - const appName = context.packager.appInfo.productFilename; - const appPath = `${appOutDir}/${appName}.app`; - - const appleId = process.env.APPLE_ID; - const appleIdPassword = process.env.APPLE_APP_SPECIFIC_PASSWORD; - const teamId = process.env.APPLE_TEAM_ID; - - // Skip if credentials not provided (for unsigned builds) - if (!appleId || !appleIdPassword || !teamId) { - console.log('Skipping notarization: credentials not provided'); - return; - } - - console.log('Starting notarization process...'); - try { - await notarize({ - appPath: appPath, - appleId: appleId, - appleIdPassword: appleIdPassword, - teamId: teamId, - }); - console.log('Notarization completed successfully'); - } catch (error) { - console.error('Notarization failed:', error); - throw error; - } -}; diff --git a/electron-builder.json b/electron-builder.json index e288ccd5..85388558 100644 --- a/electron-builder.json +++ b/electron-builder.json @@ -62,14 +62,6 @@ }, "mac": { "target": [ - { - "target": "dmg", - "arch": ["x64", "arm64"] - }, - { - "target": "zip", - "arch": ["x64", "arm64"] - }, { "target": "mas", "arch": ["x64", "arm64"] @@ -79,28 +71,11 @@ "category": "public.app-category.developer-tools", "hardenedRuntime": true, "gatekeeperAssess": false, - "entitlements": "build/entitlements.mac.plist", - "entitlementsInherit": "build/entitlements.mac.plist", + "entitlements": "build/entitlements.mas.plist", + "entitlementsInherit": "build/entitlements.mas.inherit.plist", "type": "distribution", "minimumSystemVersion": "10.15" }, - "dmg": { - "contents": [ - { - "x": 130, - "y": 220 - }, - { - "x": 410, - "y": 220, - "type": "link", - "path": "/Applications" - } - ], - "artifactName": "${productName}-${version}-${arch}.${ext}", - "sign": false, - "writeUpdateInfo": false - }, "mas": { "entitlements": "build/entitlements.mas.plist", "entitlementsInherit": "build/entitlements.mas.inherit.plist", @@ -112,6 +87,5 @@ "extendInfo": { "ITSAppUsesNonExemptEncryption": false } - }, - "afterSign": "build/notarize.cjs" + } } diff --git a/package.json b/package.json index ab3e7adc..1f1128db 100644 --- a/package.json +++ b/package.json @@ -24,10 +24,7 @@ "build:linux-portable": "npm run build && electron-builder --linux --dir", "build:linux-appimage": "npm run build && electron-builder --linux AppImage", "build:linux-targz": "npm run build && electron-builder --linux tar.gz", - "build:mac-dmg": "npm run build && electron-builder --mac dmg", - "build:mac-zip": "npm run build && electron-builder --mac zip", - "build:mac-mas": "npm run build && electron-builder --mac mas", - "build:mac-universal": "npm run build && electron-builder --mac --universal", + "build:mac": "npm run build && electron-builder --mac", "test:encryption": "tsc -p tsconfig.node.json && node ./dist/backend/backend/utils/encryption-test.js", "migrate:encryption": "tsc -p tsconfig.node.json && node ./dist/backend/backend/utils/encryption-migration.js", "prepare": "husky"