diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 07da33ae9..8f2ccc771 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,42 +47,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - - name: Release for MacOS arm - if: matrix.os == 'macos-latest' - env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} - P12_PASSWORD: ${{ secrets.P12_PASSWORD }} - # BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }} - KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} - run: | - # create variables - CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 - # PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision - KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db - - # import certificate and provisioning profile from secrets - echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH - # echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode --output $PP_PATH - - # create temporary keychain - security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH - security set-keychain-settings -lut 21600 $KEYCHAIN_PATH - security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH - - # import certificate to keychain - security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH - security list-keychain -d user -s $KEYCHAIN_PATH - - # apply provisioning profile - # mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles - # cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles - echo "${{ secrets.NOTARIZE_JS }}" > scripts/notarize.js - yarn release:m1 - - # clean up keychain and provisioning profile - security delete-keychain $RUNNER_TEMP/app-signing.keychain-db - - name: Release for MacOS x86 if: matrix.os == 'macos-12' env: diff --git a/package.json b/package.json index 6631ac330..b42a6c423 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,6 @@ "electron:build:web": "yarn workspace postcat-web run build", "electron:static": "npm run electron:tsc && electron .", "release": "npm-run-all -s electron:build:web electron:tsc && npx esno scripts/build.ts --publish=always && node upload.js", - "release:m1": "npm-run-all -s electron:build:web electron:tsc && npx esno scripts/build.ts --publish=always onTagOrDraft && node upload.js", "test": "npm-run-all --serial test:*", "e2e": "yarn build:prod && npx playwright test -c e2e/playwright.config.ts e2e/", "clear:electron:tsc": "tsc --build --clean", diff --git a/scripts/build.ts b/scripts/build.ts index f2bd8215f..6bbf76655 100644 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -1,6 +1,6 @@ import { sign, doSign } from 'app-builder-lib/out/codeSign/windowsCodeSign'; -import { build, DIR_TARGET, Platform } from 'electron-builder'; -import type { Configuration, BuildResult } from 'electron-builder'; +import { build, Platform } from 'electron-builder'; +import type { Configuration } from 'electron-builder'; import minimist from 'minimist'; import { exec, spawn } from 'node:child_process'; @@ -93,11 +93,17 @@ const config: Configuration = { gatekeeperAssess: false, entitlements: 'scripts/entitlements.mac.plist', entitlementsInherit: 'scripts/entitlements.mac.plist', - // target: ['dmg', 'zip'], - target: { - target: 'dmg', - arch: ['x64', 'arm64'] - } + // target: ['dmg', 'zip'] + target: [ + { + target: 'dmg', + arch: ['x64', 'arm64'] + }, + { + target: 'zip', + arch: ['x64', 'arm64'] + } + ] }, dmg: { sign: false