title: deploy pypi after sucess travisci
body: <p>I've successfully deployed a package to PyPI using Travis, however I find it deploys no matter scripts are successful or not. How to deploy only if unit tests are successful?</p>
  
  <pre><code>language: python
  python:
    - '3.6'
  os:
    - linux
  install:
    - pip install -q -r requirements-dev.txt
    - pip install coverage
    - pip install coveralls
  script:
    - python test.py
    - coverage run test.py
  after_success:
    - coverage report
  deploy:
    provider: pypi
    user: user
    distributions: "bdist_wheel"
    password:
      secure: secure_pẁ
    on:
      tags: false
      branch: dev
  </code></pre>