Skip to content

Commit

Permalink
sign osx
Browse files Browse the repository at this point in the history
  • Loading branch information
ceddybi committed Jan 31, 2024
1 parent bccf3fb commit a923e36
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,6 @@ typings/
out/

user_data/

*keys
/keys
21 changes: 20 additions & 1 deletion forge.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'dotenv/config';

import { AutoUnpackNativesPlugin } from '@electron-forge/plugin-auto-unpack-natives';
import type { ForgeConfig } from '@electron-forge/shared-types';
import { MakerRpm } from '@electron-forge/maker-rpm';
Expand All @@ -9,6 +11,12 @@ import packageJson from './package.json';
import { rendererConfig } from './webpack.renderer.config';

const config: ForgeConfig = {
// hooks: {
// packageAfterCopy: async (forgeConfig, build_path) => {
// console.log(`\nBuild Path: ${build_path}`);
// await minify(build_path + '/src');
// },
// },
packagerConfig: {
name: packageJson.productName,
icon: './src/assets/icon',
Expand All @@ -18,7 +26,18 @@ const config: ForgeConfig = {
"name": packageJson.productName,
"schemes": [packageJson.name]
}
]
],
osxSign: {
identity: process.env.SIGN_ID,
}, // object must exist even if empty
osxNotarize: {
appleId: process.env.APPLE_ID || "",
appleIdPassword: process.env.APPLE_PASSWORD || "",
teamId: process.env.APPLE_TEAM_ID || ""
// appleApiKey: process.env.APPLE_API_KEY || "",
// appleApiKeyId: process.env.APPLE_API_KEY_ID || "",
// appleApiIssuer: process.env.APPLE_API_ISSUER || ""
}
},
rebuildConfig: {},
makers: [new MakerSquirrel({}), new MakerZIP({}, ['darwin']), new MakerRpm({}),
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"scripts": {
"start": "APP_DEV=true electron-forge start",
"package": "electron-forge package",
"make": "electron-forge make",
"publish": "electron-forge publish",
"make": "DEBUG=electron-osx-sign* electron-forge make --arch=x64 --platform=darwin",
"publish": "electron-forge publish --arch=x64 --platform=darwin",
"lint": "eslint --ext .ts,.tsx ."
},
"keywords": [],
Expand Down Expand Up @@ -37,6 +37,7 @@
"@vercel/webpack-asset-relocator-loader": "1.7.3",
"autoprefixer": "^10.4.17",
"css-loader": "^6.0.0",
"dotenv": "^16.4.1",
"electron": "28.2.0",
"eslint": "^8.0.1",
"eslint-plugin-import": "^2.25.0",
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2752,6 +2752,11 @@ dot-case@^3.0.4:
no-case "^3.0.4"
tslib "^2.0.3"

dotenv@^16.4.1:
version "16.4.1"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.1.tgz#1d9931f1d3e5d2959350d1250efab299561f7f11"
integrity sha512-CjA3y+Dr3FyFDOAMnxZEGtnW9KBR2M0JvvUtXNW+dYJL5ROWxP9DUHCwgFqpMk0OXCc0ljhaNTr2w/kutYIcHQ==

eastasianwidth@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb"
Expand Down

0 comments on commit a923e36

Please sign in to comment.