githubtravis-cigithub-release

Travis CI release to GitHub does not include files


I want to release two zip files that are created in a Travis CI build to the GitHub Release page.

Unfortunately, only the source code is listed under assets after the deploy, but not the two zip files.

The deploy steps look like this:

deploy:
  provider: releases
  api_key:
    secure: <api key>
  file: 
    - "file-1.zip"
    - "file-2.zip"
  on:
    repo: user/repo
    tags: true

I've checked that the zip files are built and in the root folder of the build directory.

Does anyone have an idea what I'm doing wrong?


Solution

  • The solution was a missing skip_cleanup: true in the deploy section. Without this, the files to publish are deleted in the start phase of the deploy job.

    complete config looks like this now:

    deploy:
      provider: releases
      api_key:
        secure: 
      file: 
        - "file-1.zip"
        - "file-2.zip"
      skip_cleanup: true
      on:
        repo: user/repo
        tags: true