From ed9963c0a5a15000980c9674da0038a217525161 Mon Sep 17 00:00:00 2001 From: Pompurin404 Date: Tue, 31 Dec 2024 14:40:52 +0800 Subject: [PATCH] only enable notarize when release --- .github/workflows/build.yml | 8 ++++++++ electron-builder.yml | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 307c91c..bddaebf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -197,6 +197,10 @@ jobs: pnpm install pnpm add @mihomo-party/sysproxy-darwin-${{ matrix.arch }} pnpm prepare --${{ matrix.arch }} + - name: Enable Notarization + if: startsWith(github.ref, 'refs/tags/v') + run: | + sed -i "" -e "s/notarize: false/notarize: true/" electron-builder.yml - name: Build env: npm_config_arch: ${{ matrix.arch }} @@ -252,6 +256,10 @@ jobs: pnpm add @mihomo-party/sysproxy-darwin-${{ matrix.arch }} pnpm add -D electron@32.2.2 pnpm prepare --${{ matrix.arch }} + - name: Enable Notarization + if: startsWith(github.ref, 'refs/tags/v') + run: | + sed -i "" -e "s/notarize: false/notarize: true/" electron-builder.yml - name: Build env: npm_config_arch: ${{ matrix.arch }} diff --git a/electron-builder.yml b/electron-builder.yml index 0e136c0..e8d6002 100644 --- a/electron-builder.yml +++ b/electron-builder.yml @@ -44,7 +44,7 @@ mac: - NSMicrophoneUsageDescription: Application requests access to the device's microphone. - NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder. - NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder. - notarize: true + notarize: false artifactName: ${name}-macos-${version}-${arch}.${ext} pkg: allowAnywhere: false