2

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)
Micah Zoltu
  • 6,764
  • 5
  • 44
  • 72

1 Answers1

1

You're probably looking to use the file_glob option, which allows you to define a wildcard in your file definition. Try this:

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

(see https://stackoverflow.com/a/28579635/834036)

Community
  • 1
  • 1
ToddD
  • 95
  • 10