Skip to content

Commit 0a9c214

Browse files
feat: notarizing macOS builds (#219)
1 parent 4a76beb commit 0a9c214

File tree

6 files changed

+136
-35
lines changed

6 files changed

+136
-35
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ src/renderer/types/auto-imports.d.ts
99
src/renderer/types/components.d.ts
1010
*.log
1111
*.local
12+
.env

config/electron-builder.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export default {
1515
directories: {
1616
output: path.resolve(__dirname, '../../dist')
1717
},
18+
afterSign: 'build/scripts/notarize.js',
1819
nsis: {
1920
oneClick: false,
2021
perMachine: false,
@@ -26,7 +27,10 @@ export default {
2627
{ target: 'dmg', arch: 'arm64' },
2728
{ target: 'dmg', arch: 'x64' }
2829
],
29-
icon: 'config/icons/icon.icns'
30+
icon: 'config/icons/icon.icns',
31+
category: 'public.app-category.productivity',
32+
hardenedRuntime: true,
33+
entitlements: 'build/entitlements.mac.inherit.plist'
3034
},
3135
win: {
3236
target: 'nsis',

entitlements.mac.inherit.plist

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>com.apple.security.cs.allow-jit</key>
6+
<true/>
7+
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
8+
<true/>
9+
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
10+
<true/>
11+
</dict>
12+
</plist>

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@
1010
"dev:watch": "tsc-watch -p tsconfig.electron.json --onFirstSuccess \"npm run dev:server\"",
1111
"dev:server": "node build/scripts/dev-server.js",
1212
"dev:vue-devtools": "vue-devtools",
13-
"build": "npm run ts-check:vue && npm run build:ts && node build/scripts/build.js ",
13+
"build": "npm run ts-check:vue && npm run copy:plist && npm run build:ts && node build/scripts/build.js ",
1414
"build:ts": "tsc -p tsconfig.electron.json",
1515
"ts-check:vue": "vue-tsc --noEmit --skipLibCheck",
1616
"lint": "eslint --ext .js,.ts,.vue . src",
1717
"lint:fix": "eslint --ext .js,.ts,.vue . --fix src",
1818
"release": "bumpp -c 'build: release v' -t",
1919
"generate:language-readme": "node build/scripts/generate-language-readme.js ",
20+
"copy:plist": "copyfiles *.plist build",
2021
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
2122
"prepare": "husky install"
2223
},
@@ -98,8 +99,11 @@
9899
"bumpp": "^7.1.1",
99100
"chalk": "^4.1.2",
100101
"chokidar": "^3.5.2",
102+
"copyfiles": "^2.4.1",
103+
"dotenv": "^16.0.1",
101104
"electron": "^16.2.3",
102105
"electron-builder": "^23.1.0",
106+
"electron-notarize": "^1.2.1",
103107
"eslint": "^8.5.0",
104108
"eslint-config-prettier": "^8.3.0",
105109
"eslint-plugin-import": "^2.25.3",

0 commit comments

Comments
 (0)