Skip to content

Commit

Permalink
feat: notarizing macOS builds (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonreshetov committed Aug 10, 2022
1 parent 4a76beb commit 0a9c214
Show file tree
Hide file tree
Showing 6 changed files with 136 additions and 35 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ src/renderer/types/auto-imports.d.ts
src/renderer/types/components.d.ts
*.log
*.local
.env
6 changes: 5 additions & 1 deletion config/electron-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default {
directories: {
output: path.resolve(__dirname, '../../dist')
},
afterSign: 'build/scripts/notarize.js',
nsis: {
oneClick: false,
perMachine: false,
Expand All @@ -26,7 +27,10 @@ export default {
{ target: 'dmg', arch: 'arm64' },
{ target: 'dmg', arch: 'x64' }
],
icon: 'config/icons/icon.icns'
icon: 'config/icons/icon.icns',
category: 'public.app-category.productivity',
hardenedRuntime: true,
entitlements: 'build/entitlements.mac.inherit.plist'
},
win: {
target: 'nsis',
Expand Down
12 changes: 12 additions & 0 deletions entitlements.mac.inherit.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?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-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
</dict>
</plist>
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
"dev:watch": "tsc-watch -p tsconfig.electron.json --onFirstSuccess \"npm run dev:server\"",
"dev:server": "node build/scripts/dev-server.js",
"dev:vue-devtools": "vue-devtools",
"build": "npm run ts-check:vue && npm run build:ts && node build/scripts/build.js ",
"build": "npm run ts-check:vue && npm run copy:plist && npm run build:ts && node build/scripts/build.js ",
"build:ts": "tsc -p tsconfig.electron.json",
"ts-check:vue": "vue-tsc --noEmit --skipLibCheck",
"lint": "eslint --ext .js,.ts,.vue . src",
"lint:fix": "eslint --ext .js,.ts,.vue . --fix src",
"release": "bumpp -c 'build: release v' -t",
"generate:language-readme": "node build/scripts/generate-language-readme.js ",
"copy:plist": "copyfiles *.plist build",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
"prepare": "husky install"
},
Expand Down Expand Up @@ -98,8 +99,11 @@
"bumpp": "^7.1.1",
"chalk": "^4.1.2",
"chokidar": "^3.5.2",
"copyfiles": "^2.4.1",
"dotenv": "^16.0.1",
"electron": "^16.2.3",
"electron-builder": "^23.1.0",
"electron-notarize": "^1.2.1",
"eslint": "^8.5.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.25.3",
Expand Down
Loading

0 comments on commit 0a9c214

Please sign in to comment.