How do I deploy a directory to GitHub with Travis CI?

时间:2015-04-23 05:43:50

标签: travis-ci

I would like to deploy an entire directory as a GitHub release on successful build of my project. However, when I try to provide a directory to the file deploy option it complains that it is a directory.

I do not want to list every file by hand as that will change over time and I don't want to have to update my .travis.yml file every time I add/remove a file to/from the project.

It is possible that I am not using github releases correctly. Previously, I have released by creating an orphan tag that contains the files I want to release. I was hoping that the travis releases deployment would simplify this process.

.travis.yml:

deploy:
  provider: releases
  api_key: ${GITHUB_API_KEY}
  file: "output/system"
  skip_cleanup: true
  on:
    tags: true

Error:

/home/travis/.rvm/gems/ruby-1.9.3-p551/gems/octokit-3.8.0/lib/octokit/client/releases.rb:86:in `initialize': Is a directory - output/system (Errno::EISDIR)

1 个答案:

答案 0 :(得分:1)

您可能希望使用UPDATE mytable a SET a.val = (SELECT MAX(val) FROM mytable b WHERE b.data = a.data) WHERE a.val IS NULL 选项,该选项允许您在file_glob定义中定义通配符。试试这个:

file

(见https://stackoverflow.com/a/28579635/834036