Skip to content

Commit

Permalink
feat(auto-update): Adds code signing for Mac + auto-update & removes …
Browse files Browse the repository at this point in the history
…grandiose / NDI (#414)

* ci(notarization): adds signing and notarization to ci build

Follows the following two guides to add Apple Application signing and notarization steps to the CI
build process. https://kilianvalkhof.com/2019/electron/notarizing-your-electron-application/
https://www.update.rocks/blog/osx-signing-with-travis/

re #96

* feat(auto-update): Added electron-builder

* feat(auto-update): Added mac-specific entitlements

* chore(auto-update): Remove unneeded stuff.

* feat(auto-update): Notarization script after sign

* chore(show-update): Added dotenv & latest electron-builder

* feat(auto-update): Add description

* fix(auto-update): Use xcode12 to build for macOS

* fix: forces asar packing for macOS

* fix: reverts forced asar configuration

* ci(npm): Update webpack-2 & node-sass, remove grandiose

* fix(electron-builder): Disable NDI as that required grandiose which was removed

* ci(travis): Disable code signing for Windows and Linux in electron-builder

Co-authored-by: Sam Wray <sam@wray.pro>
  • Loading branch information
TimPietrusky and 2xAA committed Sep 6, 2020
1 parent 819010b commit 991153e
Show file tree
Hide file tree
Showing 11 changed files with 21,993 additions and 95 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ yarn-error.log*
*.sw?

#Electron-builder output
/dist_electron
/dist_electron
.env
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- YARN_GPG=no
- name: "Build on macOS"
os: osx
osx_image: xcode10.2
osx_image: xcode12
env:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
Expand All @@ -32,6 +32,7 @@ cache:
- "$HOME/.cache/electron-builder"
before_install:
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then wget https://github.com/Palakis/obs-ndi/releases/download/4.9.0/libndi4_4.5.1-1_amd64.deb && sudo dpkg -i libndi4_4.5.1-1_amd64.deb; fi
- if [ "$TRAVIS_OS_NAME" = "windows" ] || [ "$TRAVIS_OS_NAME" = "linux" ]; then unset CSC_KEY_PASSWORD CSC_LINK; fi
script:
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then yarn run electron:build -w --publish=never; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then yarn run electron:build -m --publish=never; fi
Expand Down
8 changes: 8 additions & 0 deletions build/entitlements.mac.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
</dict>
</plist>
18 changes: 18 additions & 0 deletions notarize.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
require("dotenv").config();
const { notarize } = require("electron-notarize");

exports.default = async function notarizing(context) {
const { electronPlatformName, appOutDir } = context;
if (electronPlatformName !== "darwin") {
return;
}

const appName = context.packager.appInfo.productFilename;

return await notarize({
appBundleId: "gl.vcync.modv",
appPath: `${appOutDir}/${appName}.app`,
appleId: process.env.APPLEID,
appleIdPassword: process.env.APPLEIDPASS
});
};
Loading

0 comments on commit 991153e

Please sign in to comment.