Electron-builder 版本尝试发布到 Github 并抱怨 GH_Token
Electron-builder release tries to publish to Github and complains about GH_Token
运行 没有 publish
选项的 release
脚本试图将构建发布到 GitHub (并在抱怨无法找到 GHToken 时失败!)
Error: GitHub Personal Access Token is not set, neither programmatically, nor using env "GH_TOKEN"
设置"publish": "never"
会失败还会抱怨找不到模块electron-publisher-never
!
Error: Cannot find module 'electron-publisher-never'
这一切都在构建项目时发生,但构建脚本退出非零!
我使用的是最新版本的 electron-builder。
我的构建脚本:
"build": {
"appId": "eu.armand.[****]",
"copyright": "Copyright © 2017 mim_Armand",
"productName": "[****]",
"mac": {
"publish": "never",
"category": "public.app-category.[****]",
"icon": "assets/icons/mac/icon.icns"
}
知道发生了什么或者我做错了吗?!
,m
尝试使用
构建
"build": "electron-builder --publish never"
永不发布。
将脚本重命名 为其他名称。
如果脚本名称是 release
→ 发布设置为 always
documentation 指出:
CLI --publish option values:
...
If npm script named release
, — always.
Add to scripts in the development package.json:
"release": "build"
and if you run yarn release
, a release will be drafted (if doesn’t
already exist) and artifacts published.
我是这样解决的,因为我不需要把它放在任何仓库中
"build":{
"appId": "XXX",
"productName": "XXX",
"directories":{
"output": "build"
},
"win":{
"target": "nsis",
"publish" : []
}
}
运行 没有 publish
选项的 release
脚本试图将构建发布到 GitHub (并在抱怨无法找到 GHToken 时失败!)
Error: GitHub Personal Access Token is not set, neither programmatically, nor using env "GH_TOKEN"
设置"publish": "never"
会失败还会抱怨找不到模块electron-publisher-never
!
Error: Cannot find module 'electron-publisher-never'
这一切都在构建项目时发生,但构建脚本退出非零!
我使用的是最新版本的 electron-builder。 我的构建脚本:
"build": {
"appId": "eu.armand.[****]",
"copyright": "Copyright © 2017 mim_Armand",
"productName": "[****]",
"mac": {
"publish": "never",
"category": "public.app-category.[****]",
"icon": "assets/icons/mac/icon.icns"
}
知道发生了什么或者我做错了吗?!
,m
尝试使用
构建"build": "electron-builder --publish never"
永不发布。
将脚本重命名 为其他名称。
如果脚本名称是 release
→ 发布设置为 always
documentation 指出:
CLI --publish option values:
...
If npm script namedrelease
, — always.
Add to scripts in the development package.json:
"release": "build"
and if you runyarn release
, a release will be drafted (if doesn’t already exist) and artifacts published.
我是这样解决的,因为我不需要把它放在任何仓库中
"build":{
"appId": "XXX",
"productName": "XXX",
"directories":{
"output": "build"
},
"win":{
"target": "nsis",
"publish" : []
}
}