Skip to content

Instantly share code, notes, and snippets.

@jobevers
Created June 21, 2016 17:29
Show Gist options
  • Save jobevers/fdd91de341a6bcf4c7f787480e3c37fa to your computer and use it in GitHub Desktop.
Save jobevers/fdd91de341a6bcf4c7f787480e3c37fa to your computer and use it in GitHub Desktop.
Releasing two different builds on travis

In order to release both a linux version and an osx version of a package using travis, you need to have two different providers, conditioned on the TRAVIS_OS_NAME.

For example:

deploy:
  - provider: releases
    file: "${TRAVIS_BUILD_DIR}/my_awesome_package.deb"
    skip_cleanup: true
    on:
      tags: true
      condition: "$TRAVIS_OS_NAME = linux"
      # this is the oauth token for the release user
    api_key:
      secure: ---
  - provider: releases
    file: "${TRAVIS_BUILD_DIR}/my_awesome_package.dmg"
    skip_cleanup: true
    on:
      tags: true
      condition: "$TRAVIS_OS_NAME = osx"
    # this is the oauth token for the release user
    api_key:
      secure: ---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment