发布 Release

git:release

Git 发布 Release

# 适用事件

  • push
  • branch.create
  • tag_push
  • pull_request.merged
  • api_trigger
  • web_trigger
  • tag_deploy

# 参数

# overlying

  • type: Boolean
  • required: false
  • default: false

叠加模式

  • true:叠加模式,同一个 release 可以提交多次,最终的 release 是多次提交的并集。如果同名附件已经存在,会先删除再上传,达到更新的效果。
  • false:非叠加模式,以最后一个提交的为准,前面的会被清除。

注意

默认情况下,当 release 版本已经存在时,会先删除这个版本,重新生成。

# name

  • type: String
  • required: false

release 的名称

tag_push 事件必填,用来确定 Tag 名。

tag_push 事件,自动取当前 Tag 名。

# title

  • type: String
  • required: false
  • default: ``Tag

release 的标题

# description

  • type: String
  • required: false

release 的描述

# preRelease

  • type: Boolean
  • required: false
  • default: false

是否将 release 设置为 “预发布”

# 输出结果

# 配置样例

# 生成 changelog 并自动更新 release 描述

$:
  tag_push:
    - stages:
        - name: changelog
          image: cnbcool/changelog
          exports:
            latestChangeLog: LATEST_CHANGE_LOG
        - name: upload release
          type: git:release
          options:
            title: release
            description: ${LATEST_CHANGE_LOG}

# Push

main:
  push:
    - stages:
        - name: git release
          type: git:release
          options:
            name: Nightly
            description: description