跳到内容

builder util runtime.Interface.GithubOptions

Electron-Builder / builder-util-runtime / GithubOptions

GitHub 选项。

需要 GitHub 个人访问令牌。您可以通过访问 https://github.com/settings/tokens/new 生成。访问令牌应具有 repo 作用域/权限。定义 GH_TOKEN 环境变量。

继承自

属性

channel?

readonly optional channel: null | string

频道。

默认值

latest

host?

readonly optional host: null | string

主机(如果需要,包括端口)。

默认值

github.com

owner?

readonly optional owner: null | string

所有者。


private?

readonly optional private: null | boolean

如果定义了 GH_TOKEN 环境变量,是否使用私有 github 自动更新提供程序。请参阅 私有 GitHub 更新仓库


protocol?

readonly optional protocol: null | "https" | "http"

协议。GitHub 发布者仅支持 https

默认值

https

provider

readonly provider: "github"

提供程序。必须是 github

覆盖

PublishConfiguration.provider


publishAutoUpdate?

readonly optional publishAutoUpdate: boolean

是否发布自动更新信息文件。

自动更新仅依赖列表中的第一个提供程序(您可以指定多个发布者)。因此,可能不需要为其他配置的提供程序上传元数据文件。但默认情况下将上传。

默认值

true

继承自

PublishConfiguration.publishAutoUpdate


releaseType?

optional releaseType: null | "draft" | "prerelease" | "release"

发布类型。默认情况下,将创建 draft 发布。

您还可以使用环境变量设置发布类型。如果 EP_DRAFT 设置为 truedraft,如果 EP_PRE_RELEASE 设置为 trueprerelease

默认值

draft

repo?

readonly optional repo: null | string

仓库名称。 自动检测


requestHeaders?

readonly optional requestHeaders: OutgoingHttpHeaders

任何自定义请求标头

继承自

PublishConfiguration.requestHeaders


timeout?

readonly optional timeout: null | number

请求超时时间,以毫秒为单位。(默认为 2 分钟;0 被忽略)

默认值

120000

继承自

PublishConfiguration.timeout


token?

readonly optional token: null | string

用于支持从私有 github 仓库自动更新的访问令牌。永远不要在配置文件中指定它。仅用于 setFeedURL


vPrefixedTagName?

readonly optional vPrefixedTagName: boolean

是否使用带 v 前缀的标签名称。

默认值

true