【发布时间】:2019-04-26 22:38:06
【问题描述】:
我需要帮助或解释如何通过 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)
并输出:
当我将此变量附加到正文时,特拉维斯说我
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
希望得到您的帮助,谢谢!
【问题讨论】:
标签: github travis-ci continuous-deployment github-release