I have created a simple travis configuration which packages an app and tries to deploy the archive file to github. The problem is, I would like to have the version number part of the file name, so i require to use a pattern for the filename. I simply can't get it to work.
Configuration is currently:
deploy: provider: releases file: "build/distributions/worktrail-app-hub-sync*.zip" on: repo: worktrail/worktrail-app-hub-sync tags: true all_branches: true
But it fails with: "/home/travis/.rvm/gems/ruby-1.9.3-p547/gems/octokit-3.3.1/lib/octokit/client/releases.rb:86:in `initialize': No such file or directory - build/distributions/worktrail-app-hub-sync*.zip (Errno::ENOENT)" - but the file is certainly there: build/distributions/worktrail-app-hub-sync-0.0.1.zip
Example run: https://travis-ci.org/worktrail/worktrail-app-hub-sync/builds/35704111 travis.yml: https://github.com/worktrail/worktrail-app-hub-sync/blob/0.0.1/.travis.yml
Is this supported by travis deployment, or is there any workaround for this use case?
Configuration. Travis CI is configured by adding a file named . travis. yml , which is a YAML format text file, to the root directory of the repository.
You most certainly can! And you get 1 month for free – 12 months for the price of 11! Simply select the annual option when signing up for a subscription, or go to travis-ci.com if you wish to switch your current plan to annual.
Wildcards are supported by now if you enable the file_glob
option. This is how I deploy a build .deb
file to GitHub releases:
before_deploy: - export RELEASE_PKG_FILE=$(ls *.deb) - echo "deploying $RELEASE_PKG_FILE to GitHub releases" deploy: provider: releases api_key: secure: YOUR_ENCRYPTED_API_KEY file_glob: true file: "${RELEASE_PKG_FILE}" on: tags: true
Setting up is easy by executing travis setup releases
with a dummy filename and modifying .travis.yml
afterwards.
deploy: file_glob: true file: "build/distributions/worktrail-app-hub-sync*.zip"
example
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With