diff --git a/.github/workflows/electron.yml b/.github/workflows/electron.yml index 03d5102..ac61934 100644 --- a/.github/workflows/electron.yml +++ b/.github/workflows/electron.yml @@ -51,13 +51,37 @@ jobs: npm install -g appdmg@0.6.6 - name: install dependencies run: npm install + - name: import signing certificate + env: + APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} + APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} + run: | + if [ -n "$APPLE_CERTIFICATE" ]; then + echo "$APPLE_CERTIFICATE" | base64 --decode > certificate.p12 + security create-keychain -p "" build.keychain + security default-keychain -s build.keychain + security unlock-keychain -p "" build.keychain + security import certificate.p12 -k build.keychain -P "$APPLE_CERTIFICATE_PASSWORD" -T /usr/bin/codesign + security set-key-partition-list -S apple-tool:,apple: -s -k "" build.keychain + rm certificate.p12 + echo "APPLE_SIGN=true" >> $GITHUB_ENV + echo "Signing certificate imported" + else + echo "No signing certificate found, building unsigned" + fi - name: build and publish arm64 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + APPLE_ID: ${{ secrets.APPLE_ID }} + APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} + APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} run: npx electron-forge publish --arch=arm64 - name: build and publish x64 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + APPLE_ID: ${{ secrets.APPLE_ID }} + APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} + APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} run: npx electron-forge publish --arch=x64 build_on_win: diff --git a/forge.config.js b/forge.config.js index c1f74ad..72a3113 100644 --- a/forge.config.js +++ b/forge.config.js @@ -27,6 +27,7 @@ function getRepoInfo() { } const repoInfo = getRepoInfo(); +const shouldSign = process.env.APPLE_SIGN === 'true'; module.exports = { packagerConfig: { @@ -38,7 +39,21 @@ module.exports = { productName: "WaveLogGate", win32Metadata: { companyName: "DJ7NT" - } + }, + ...(shouldSign ? { + osxSign: { + 'hardened-runtime': true, + 'gatekeeper-assess': false, + entitlements: 'entitlements.plist', + 'entitlements-inherit': 'entitlements.plist', + }, + osxNotarize: { + tool: 'notarytool', + appleId: process.env.APPLE_ID, + appleIdPassword: process.env.APPLE_ID_PASSWORD, + teamId: process.env.APPLE_TEAM_ID, + }, + } : {}), }, publishers: [ { diff --git a/index.html b/index.html index 94950d6..6bc7708 100644 --- a/index.html +++ b/index.html @@ -198,6 +198,40 @@
+
@@ -337,6 +371,60 @@
UDP Listener (WSJT-X)
+ + +