当发布设置为始终时,electron-builder 不会在 GitHub 中创建发布,尽管没有错误
Posted
技术标签:
【中文标题】当发布设置为始终时,electron-builder 不会在 GitHub 中创建发布,尽管没有错误【英文标题】:electron-builder doesn't create a release in GitHub when publish is set to always, though there are no errors 【发布时间】:2021-10-03 23:08:27 【问题描述】:我正在尝试将电子应用程序发布到我的 GitHub 存储库的版本中。
这是我的package.json
"name": "sample-electron-app",
"version": "1.0.1",
"description": "",
"main": "index.js",
"scripts":
"test": "echo \"Error: no test specified\" && exit 1",
"start": "electron .",
"build": "electron-builder build --win --publish never",
"deploy": "electron-builder build --win --publish always"
,
"author": "",
"license": "ISC",
"devDependencies":
"electron": "^13.1.7",
"electron-builder": "^22.11.7"
,
"dependencies":
"electron-updater": "^4.3.9"
,
"repository":
"type": "git",
"url": "https://github.com/sriramsridharanvr/sample-electron-app.git"
当我运行 npm run deploy
脚本时,我希望它会在 GitHub 存储库中创建一个名为 v1.0.1
的版本,但没有任何反应。 electron-builder 的输出没有显示任何错误。这是控制台输出:
• loaded configuration file=D:\projects\rnd\electron-app-update\prototype-3\sample-electron-app\electron-builder.yml
• description is missed in the package.json appPackageFile=D:\projects\rnd\electron-app-update\prototype-3\sample-electron-app\package.json
• writing effective config file=dist\builder-effective-config.yaml lectron-builder.yml
• packaging platform=win32 arch=x64 electron=13.1.7 appOutDir=dist\win-unpacked ototype-3\sample-electron-a
• "token" specified in the github publish options. It should be used only for [setFeedURL](module:electron-updater/out/AppUpdater.AppUpdater+setFeedURL).
• default Electron icon is used reason=application icon is not set
• building target=nsis file=dist\sample-electron-app Setup 1.0.1.exe archs=x64 oneClick=true perMaelectron-updater/out/AppUpdchine=false
• building block map blockMapFile=dist\sample-electron-app Setup 1.0.1.exe.blockmap
• "token" specified in the github publish options. It should be used only for [setFeedURL](module:chine=falseelectron-updater/out/AppUpdater.AppUpdater+setFeedURL).
• "token" specified in the github publish options. It should be used only for [setFeedURL](module:electron-updater/out/AppUpdelectron-updater/out/AppUpdater.AppUpdater+setFeedURL).
• publishing publisher=Github (owner: sriramsridharanvr, project: sample-electron-app, versioelectron-updater/out/AppUpdn: 1.0.1)
• uploading file=sample-electron-app-Setup-1.0.1.exe.blockmap provider=GitHub n: 1.0.1)
• uploading file=sample-electron-app-Setup-1.0.1.exe provider=GitHub
• creating GitHub release reason=release doesn't exist tag=v1.0.1 version=1.0.1
[====================] 100% 0.0s | sample-electron-app-Setup-1.0.1.exe to GitHub
从最后两行可以看出,它说它创建了一个标签 (v1.0.1) 和一个相应的版本。但是我的存储库都没有创建。
显然,我遗漏了一些非常微不足道的东西。请帮助我了解这里发生了什么。
PS:我正在尝试构建一个基于this article 的自动更新应用程序。
【问题讨论】:
【参考方案1】:Electron-builder 将首先在 GitHub 上发布您的应用作为草稿,然后您需要手动进入并发布版本。
看一看:https://github.com/sriramsridharanvr/sample-electron-app/releases
看看您是否可以看到任何已创建的草稿。
【讨论】:
谢谢。我太傻了,没有进入发布页面并检查!以上是关于当发布设置为始终时,electron-builder 不会在 GitHub 中创建发布,尽管没有错误的主要内容,如果未能解决你的问题,请参考以下文章
electron-builder - 只为 mac 构建,但设置为构建 mac 并获胜
配置 electron-builder 运行 powershell 脚本