mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-07 18:07:05 +00:00
no message
This commit is contained in:
parent
f2f9e433b5
commit
17e95f7147
@ -3,7 +3,7 @@
|
||||
## 发布前
|
||||
|
||||
1. 添加环境变量 `APPLEID`、`APPLEIDPASS`、`CSC_LINK`
|
||||
2. 发布GitHub还需要添加 `GH_PAT`
|
||||
2. 发布GitHub还需要添加 `GH_TOKEN`
|
||||
3. 发布私有服务器还需要添加 `DP_KEY`
|
||||
|
||||
## 通过 GitHub Actions 发布
|
||||
|
||||
28
electron/build.js
vendored
28
electron/build.js
vendored
@ -176,22 +176,28 @@ function startBuild(data, publish, release) {
|
||||
if (publish !== true || !process.env.APPLEID || !process.env.APPLEIDPASS) {
|
||||
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');
|
||||
// build
|
||||
child_process.spawnSync("npm" + comSuffix, ["run", data.platform], {stdio: "inherit", cwd: "electron"});
|
||||
// package.json Recovery
|
||||
fse.copySync(packageBakFile, packageFile)
|
||||
// publish
|
||||
if (publish === true) {
|
||||
// generic
|
||||
if (process.env.DP_KEY) {
|
||||
genericPublish({
|
||||
url: data.publish,
|
||||
key: process.env.DP_KEY,
|
||||
version: config.version,
|
||||
output: econfig.build.directories.output
|
||||
})
|
||||
}
|
||||
// publish generic method
|
||||
if (publish === true && process.env.DP_KEY) {
|
||||
genericPublish({
|
||||
url: data.publish,
|
||||
key: process.env.DP_KEY,
|
||||
version: config.version,
|
||||
output: econfig.build.directories.output
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -73,7 +73,7 @@
|
||||
],
|
||||
"npmRebuild": false,
|
||||
"publish": {
|
||||
"provider": "github"
|
||||
"provider": "generic"
|
||||
},
|
||||
"releaseInfo": {},
|
||||
"afterSign": "./notarize.js",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user