如何在电子生成器中添加发布者

How to add publisher in electron builder

我是电子新手,正在尝试在电子生成器中添加发布者。但是当它创建安装程序时,它说发布者未知。

我在 package.json 中的构建对象是

"build": {
    "appId": "app.name",
    "win": {
      "target": "nsis",
      "icon": "iconnewa1.ico"
    },
    "publish": {
      "provider": "s3",
      "bucket": "bucket_name"
    },
    "mac": {
      "category": "app.category",
      "target": [
        "zip",
        "dmg"
      ]
    },
    "nsis": {
      "perMachine": true
    }
  }

请帮我解决这个问题。我搜索了整个文档以在电子生成器中添加发布者但无法获得任何成功。

Windows 示例:

"win": {
  "asar": true,
  "icon": "app/img/icon.ico",
  "legalTrademarks": "(c) 2018 example.com",
  "publisherName": "Example.com",
  "target": [
    "portable"
  ]
}

您必须使用代码签名来避免这种情况:

The regular (and often cheaper) Code Signing Certificate shows a warning during installation that goes away once enough users installed your application and you've built up trust. The EV Certificate has more trust and thus works immediately without any warnings.

https://www.electron.build/code-signing