Upload an asset folder to GitHub release using travis

I use travis to automate build and deploy to GitHub release page. Now the structure is:


  • file1
  • file2

But I want to it like this:


  • folder1
    • file1
  • file2

The travis script is (Omit unrelated parts):

function uploadHasFolder {
  echo "upload folder"
  cd root_worksapce
  touch file2
  echo hello > file2
  mkdir folder1
  cd folder1
  touch file1
  echo hello > file1

And the .travis.yaml is (Omit unrelated parts):

  provider: releases
  file_glob: true
  file: root_worksapce-${TRAVIS_TAG}/**/*  
  skip_cleanup: true
    tags: true

I read the travis docs and no clues. Doesn’t travis support upload folder to GitHub release?