Build Stages: Deploying to GitHub Releases

This example has 2 build stages:

  • Two jobs that run tests
  • One job that deploys (releases) a file to GitHub Releases

Here’s what the .travis.yml config could look like:

jobs:
  include:
    - script: "Running unit tests (1)"
    - script: "Running unit tests (2)"
    - stage: GitHub Release
      script: echo "Deploying to GitHub releases ..."
      deploy:
        provider: releases
        api_key: $GITHUB_OAUTH_TOKEN
        skip_cleanup: true
        on:
          tags: true

This is how the build matrix might look:

image

You can find the code for this example on our demo repository: