.travis.yml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # PHP project
  2. language: php
  3. # which versions of PHP to build with
  4. php:
  5. - 5.5
  6. # set global environment variables
  7. env:
  8. global:
  9. # make PROJECTNAME from vendor/project
  10. # this strips everything before the last /
  11. - PROJECTNAME=${TRAVIS_REPO_SLUG##*/}
  12. # make sure we have the latest version of composer
  13. before_install:
  14. - composer self-update
  15. # install dependencies
  16. install:
  17. - composer install
  18. # no phpunit tests (yet)
  19. script: true
  20. # no email notifications
  21. notifications:
  22. email: false
  23. # before deployment make the zipfile to upload
  24. before_deploy:
  25. # don't install dev packages
  26. - composer install --no-dev
  27. # go down one directory
  28. - cd ..
  29. # exclude all .git directories
  30. - zip -r $PROJECTNAME/${PROJECTNAME}_$TRAVIS_TAG.zip $PROJECTNAME -x $PROJECTNAME/.git/**\* $PROJECTNAME/.git/ $PROJECTNAME/**/.git/**\* $PROJECTNAME/**/.git/
  31. # return to the main directory for the next step
  32. - cd $PROJECTNAME
  33. # deployment settings
  34. deploy:
  35. provider: releases
  36. api-key:
  37. secure: BnaEH4XJrO5iW31KNCmDixQBXxkmWMJ+joulCv5BmD4NoE2SuNtWveg2z7aqNfy43gG4aqQZFn/FSPBdpJGLKCxgCSFEgNB++5kYuyqKPhs4N/LA0jizuHyon2meeyfrnBXiTFh3uOr1eOmMH7u5mNy39kPEnCdn10bt16ZCxqk=
  38. # name of the zip to upload
  39. file: ${PROJECTNAME}_$TRAVIS_TAG.zip
  40. skip_cleanup: true
  41. on:
  42. # only when a tag is created in GitHub
  43. tags: true
  44. all_branches: true