使用 electron-builder 发布到 github

publish to github with electron-builder

当我测试在 github 上发布时出现此错误 write ECONNRESET at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:87:16)

这是我的代码

{
  "name": "app",
  "version": "1.0.0",
  "description": "A minimal Electron application",
  "main": "main.js",
  "scripts": {
    "start": "electron .",
    "dist": "electron-builder",
    "publish": "electron-builder --publish always"
  },
  "author": "GitHub",
  "license": "CC0-1.0",
  "devDependencies": {
    "electron": "^8.0.0",
    "electron-builder": "^22.3.2"
  },
  "repository": {
    "type" : "git",
    "url" : "https://github.com/Fizo55/app.git"
  },
  "build": {
    "appId": "com.fizo55.app",
    "productName": "app",
    "target": "NSIS",
    "directories": {
      "output": "build"
    },
    "publish": [
      {
        "provider": "github",
        "private": true,
        "owner": "Fizo55",
        "repo": "app",
        "token": "mytoken"
      }
    ],
    "nsis": {
      "allowToChangeInstallationDirectory": true,
      "oneClick": false
    }
  }
}

感谢您的帮助

经过一些测试,是我的连接问题,我打开了我的 4G,现在它可以正常工作了。