通过带有主体内容的travis-ci创建github发布的问题

时间:2019-04-25 18:34:48

标签: github travis-ci continuous-deployment github-release

在通过Travis-CI部署到github版本时,我需要帮助或解释

我有.travis.yml配置文件的一部分

jobs:
  include:
    - stage: publish
      if: env(BRANCH_IS_TAG) != true
      name: "Create Github Release"
      script:
        - yarn build
        - bash ./prepare-publish.sh
      deploy:
        provider: releases
        name: "Release ${PACKAGE_VERSION}"
        body: "test \n test \r\n + /r/n *"
        overwrite: true
        skip_cleanup: true
        api_key:
          secure: ${GITHUB_TOKEN}
        file:
          - release.zip
        on:
          all_branches: true
          repo: acacode/stonex

当我不更改此行时,配置的这一部分工作正常

  body: "test \n test \r\n + /r/n *"

收件人

  body: "${GIT_LOG}"

此变量是在部署prepare-publish.sh脚本之前创建的部分

export GIT_LOG=$(git cherry -v develop)

并输出:

enter image description here

当我将此变量附加到身体时,Travis说我

   invalid option "--body="

travis配置文件:https://raw.githubusercontent.com/acacode/stonex/internal/travis-ci-builds/.travis.yml

travis构建日志出现以下问题: https://travis-ci.org/acacode/stonex/builds/524606655#L543

包含$GIT_LOG变量的脚本: https://github.com/acacode/stonex/blob/internal/travis-ci-builds/prepare-publish.sh

希望有您的帮助,谢谢!

1 个答案:

答案 0 :(得分:1)

似乎通过body选项是travis-ci部署中的一个现有错误,尚未修复:https://github.com/travis-ci/dpl/issues/155