Releases

创建版本。Create release.

在指定仓库中创建版本发布。需指定标签名称和目标提交(commitish),可选设置版本标题、描述、是否为草稿、是否为预发布等。 如果指定的标签不存在,将基于 target_commitish 自动创建标签。通过 make_latest 参数 If the specified tag does not exist, a tag will be automatically created based on 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-release:rw

post/{repo}/-/releases

Request

  • Base URL: https://api.cnb.cool (the document declares no server; this is the origin it was published from)
  • URL: https://api.cnb.cool/{repo}/-/releases
  • Auth: API key in header Authorization

Path parameters

repostring required

不带.git后缀的仓库名称。格式:组织名称/仓库名称。Repository name without .git suffix. Format: org/repo.

Request body

bodystring

版本描述。Release description.

draftboolean

是否为草稿版本。Whether this is a draft release.

make_lateststring

是否设置为最新版本。可选值:true,false,legacy

namestring

版本标题。Release title.

prereleaseboolean

是否为预发布版本。Whether this is a pre-release.

tag_namestring

标签名称。Tag name.

target_commitishstring

目标提交哈希或分支名称。Target commit hash or branch name.

Response

Created

Changes

No recorded changes to this operation across all 1 revision of this API.