master:
  push:
    - cacheFrom: .orange-ci.cache
      docker:
        image: csighub.tencentyun.com/imweb/node8-with-gyp
      stages:
        - name: 检查合并主干
          type: git:rebaseCheck
        - name: 安装依赖
          script: tnpm i
        - name: 校验eslint
          script: tnpm run lint:fix
$:
  tag_push:
    - stages:
        - name: changelog
          type: git:changeLog
          options:
            filename: CHANGELOG.md
            target: master
            display: {
              "feat": "Features",
              "fix": "Bug fixes",
              "chore": "Chore",
              "docs": "Docs",
              "refacotr": "Refactor",
              "other": ""
            }
          exports:
            latestChangeLog: LATEST_CHANGE_LOG
        - name: upload release
          type: git:release
          options:
            description: ${LATEST_CHANGE_LOG}
        - name: send wechat notify
          type: wework:message
          options:
            robot: 5f075206-a237-4374-875d-2286c4271753
            message: ${LATEST_CHANGE_LOG}
            lastMsg: "更多信息见  [Changelog](https://git.code.oa.com/imweb/eslint-config-imweb/blob/master/CHANGELOG.md)"
