mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-17 19:23:26 +00:00
no message
This commit is contained in:
parent
f2f9e433b5
commit
17e95f7147
@ -3,7 +3,7 @@
|
|||||||
## 发布前
|
## 发布前
|
||||||
|
|
||||||
1. 添加环境变量 `APPLEID`、`APPLEIDPASS`、`CSC_LINK`
|
1. 添加环境变量 `APPLEID`、`APPLEIDPASS`、`CSC_LINK`
|
||||||
2. 发布GitHub还需要添加 `GH_PAT`
|
2. 发布GitHub还需要添加 `GH_TOKEN`
|
||||||
3. 发布私有服务器还需要添加 `DP_KEY`
|
3. 发布私有服务器还需要添加 `DP_KEY`
|
||||||
|
|
||||||
## 通过 GitHub Actions 发布
|
## 通过 GitHub Actions 发布
|
||||||
|
|||||||
16
electron/build.js
vendored
16
electron/build.js
vendored
@ -176,15 +176,22 @@ function startBuild(data, publish, release) {
|
|||||||
if (publish !== true || !process.env.APPLEID || !process.env.APPLEIDPASS) {
|
if (publish !== true || !process.env.APPLEID || !process.env.APPLEIDPASS) {
|
||||||
delete econfig.build.afterSign;
|
delete econfig.build.afterSign;
|
||||||
}
|
}
|
||||||
|
if (publish === true && process.env.GITHUB_REPOSITORY) {
|
||||||
|
// publish github package config
|
||||||
|
let repository = process.env.GITHUB_REPOSITORY.split("/")
|
||||||
|
econfig.build.publish = {
|
||||||
|
"provider": "github",
|
||||||
|
"owner": repository[0],
|
||||||
|
"repo": repository[1]
|
||||||
|
}
|
||||||
|
}
|
||||||
fs.writeFileSync(packageFile, JSON.stringify(econfig, null, 2), 'utf8');
|
fs.writeFileSync(packageFile, JSON.stringify(econfig, null, 2), 'utf8');
|
||||||
// build
|
// build
|
||||||
child_process.spawnSync("npm" + comSuffix, ["run", data.platform], {stdio: "inherit", cwd: "electron"});
|
child_process.spawnSync("npm" + comSuffix, ["run", data.platform], {stdio: "inherit", cwd: "electron"});
|
||||||
// package.json Recovery
|
// package.json Recovery
|
||||||
fse.copySync(packageBakFile, packageFile)
|
fse.copySync(packageBakFile, packageFile)
|
||||||
// publish
|
// publish generic method
|
||||||
if (publish === true) {
|
if (publish === true && process.env.DP_KEY) {
|
||||||
// generic
|
|
||||||
if (process.env.DP_KEY) {
|
|
||||||
genericPublish({
|
genericPublish({
|
||||||
url: data.publish,
|
url: data.publish,
|
||||||
key: process.env.DP_KEY,
|
key: process.env.DP_KEY,
|
||||||
@ -193,7 +200,6 @@ function startBuild(data, publish, release) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (["dev"].includes(argv[2])) {
|
if (["dev"].includes(argv[2])) {
|
||||||
// 开发模式
|
// 开发模式
|
||||||
|
|||||||
@ -73,7 +73,7 @@
|
|||||||
],
|
],
|
||||||
"npmRebuild": false,
|
"npmRebuild": false,
|
||||||
"publish": {
|
"publish": {
|
||||||
"provider": "github"
|
"provider": "generic"
|
||||||
},
|
},
|
||||||
"releaseInfo": {},
|
"releaseInfo": {},
|
||||||
"afterSign": "./notarize.js",
|
"afterSign": "./notarize.js",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user