我正在尝试将电子应用程序发布到我的 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
脚本时,我希望它会创建一个v1.0.1
在 GitHub 存储库中调用的版本,但没有任何反应。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:我正在尝试基于这篇文章构建一个自动更新的应用程序。