0

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?

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
secana
  • 671
  • 6
  • 15
  • Does [this](https://docs.travis-ci.com/user/deployment/releases/#overwrite-existing-files-on-the-release) apply? You may also need to skip cleanup. Have you looked at the logs for the release step, what do they say? – jonrsharpe Dec 21 '18 at 09:42
  • Thx @jonrsharpe. You pointed me in the right direction. While reading the docs you posted in stumble upon the solution. I've posted the solution below. – secana Dec 21 '18 at 12:13

1 Answers1

1

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
secana
  • 671
  • 6
  • 15