当 publish 设置为 always 时,electron-builder 不会在 GitHub 中创建版本,尽管没有错误

electron-builder doesn't create a release in GitHub when publish is set to always, though there are no errors

我正在尝试将电子应用程序发布到我的 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.

的自动更新应用程序

Electron-builder 将首先以草稿形式在 GitHub 上发布您的应用,然后您需要手动进入并发布该版本。

进来看看:https://github.com/sriramsridharanvr/sample-electron-app/releases

看看您是否可以看到任何已创建的草稿。