Skip to content

Commit 4d2e513

Browse files
committed
新增:MacOS 打包使用官方证书
1 parent 4854df0 commit 4d2e513

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

.github/workflows/main-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5757
APPLE_ID: ${{ secrets.APPLE_ID }}
5858
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
59+
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
5960
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
6061

6162
- name: Set Build Name ( Linux / macOS )

.github/workflows/tag-release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ jobs:
5555
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5656
APPLE_ID: ${{ secrets.APPLE_ID }}
5757
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
58+
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
5859
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
5960

6061
- name: Release Assets

scripts/notarize.cjs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const {notarize} = require("@electron/notarize");
33
exports.default = async function notarizing(context) {
44
const appName = context.packager.appInfo.productFilename;
55
const {electronPlatformName, appOutDir} = context;
6+
console.log(` • Notarization Start`);
67
// We skip notarization if the process is not running on MacOS and
78
// if the enviroment variable SKIP_NOTARIZE is set to `true`
89
// This is useful for local testing where notarization is useless
@@ -20,14 +21,14 @@ exports.default = async function notarizing(context) {
2021

2122
let appPath = `${appOutDir}/${appName}.app`;
2223
let {APPLE_ID, APPLE_ID_PASSWORD, APPLE_TEAM_ID} = process.env;
23-
console.log(` • Notarizing ${appPath}`);
24-
25-
return await notarize({
24+
const notarizeOption = {
2625
tool: "notarytool",
2726
appBundleId: appId,
2827
appPath,
2928
appleId: APPLE_ID,
3029
appleIdPassword: APPLE_ID_PASSWORD,
3130
teamId: APPLE_TEAM_ID,
32-
});
31+
}
32+
console.log(` • Notarizing`, `appPath:${appPath} notarizeOption:${JSON.stringify(notarizeOption)}`);
33+
return await notarize(notarizeOption);
3334
};

0 commit comments

Comments
 (0)