language: python
python:
- '2.7'
- '3.4'
- '3.5'
- '3.6'
git:
  depth: false
install: pip install codecov gitchangelog tox-travis
script: tox
after_success:
- codecov
- gitchangelog $(git describe --abbrev=0 --tags HEAD^)..HEAD > CHANGELOG.md
deploy:
- provider: releases
  api_key: $GITHUB_OAUTH_TOKEN
  file: CHANGELOG.md
  skip_cleanup: true
  on:
    tags: true
    python: '3.6'
- provider: pypi
  distributions: sdist bdist_wheel
  user: $TWINE_USERNAME
  password: $TWINE_PASSWORD
  on:
    tags: true
    python: '3.6'

language: python
python:
- '2.7'
- '3.4'
- '3.5'
- '3.6'
git:
  depth: false
install: pip install codecov gitchangelog tox-travis
script: tox
after_success:
- codecov
- export CHANGELOG=$(gitchangelog $(git describe --abbrev=0 --tags HEAD^)..HEAD)
deploy:
- provider: releases
  api_key: $GITHUB_OAUTH_TOKEN
  body: $CHANGELOG
  skip_cleanup: true
  on:
    tags: true
    python: '3.6'
- provider: pypi
  distributions: sdist bdist_wheel
  user: $TWINE_USERNAME
  password: $TWINE_PASSWORD
  on:
    tags: true
    python: '3.6'

Make changelog the body, not a file
Make changelog the body, not a file
