diff --git a/.travis.yml b/.travis.yml index 0a0265c5e..b802157ad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -44,17 +44,39 @@ install: script: - ./.travis/run.sh +after_success: + - ./.travis/after_success.sh + +before_deploy: + - if [[ $BUILD_DIST == true ]]; then export ZIP=$(ls dist/fonttools*.zip); export WHL=$(ls dist/fonttools*.whl); fi + notifications: irc: "irc.freenode.org##fonts" email: fonttools@googlegroups.com deploy: - provider: pypi - user: anthrotype - password: - secure: H/07cptieQgeQYEpAgXtIIZtKsVA6DJ+NeTaVlGi0ut/rCG8Mx9U1daZT1g7jjSVq/ldoNP6QXqelQAFHTDCfyvD3oB6zltHYqs+kRYMtkwfHgoHFK7c5kSdAIPML8eB29W+rp+xcJ2ciFTDoth/Wxps/SjVDe+OgJVnsO2Osgs= - distributions: "sdist bdist_wheel" - on: - tags: true - repo: behdad/fonttools - condition: $TOXENV = py35 + # deploy to Github Releases on tags + - provider: releases + api_key: + secure: KEcWhJxMcnKay7wmWJCpg2W5GWHTQ+LaRbqGM11IKGcQuEOFxWuG7W1xjGpVdKPj/MQ+cG0b9hGUFpls1hwseOA1HANMv4xjCgYkuvT1OdpX/KOcZ7gfe/qaovzVxHyP9xwohnHSJMb790t37fmDfFUSROx3iEexIX09LLoDjO8= + file: + - "${ZIP}" + - "${WHL}" + skip_cleanup: true + on: + tags: true + repo: fonttools/fonttools + all_branches: true + condition: "$BUILD_DIST == true" + # deploy to PyPI on tags + - provider: pypi + server: https://upload.pypi.org/legacy/ + user: anthrotype + password: + secure: Dz3x8kh4ergBV6qZUgcGVDOEzjoCEFzzQiO5WVw4Zfi04DD8+d1ghmMz2BY4UvoVKSsFrfKDuEB3MCWyqewJsf/zoZQczk/vnWVFjERROieyO1Ckzpz/WkCvbjtniIE0lxzB7zorSV+kGI9VigGAaRlXJyU7mCFojeAFqD6cjS4= + distributions: "sdist bdist_wheel" + on: + tags: true + repo: fonttools/fonttools + all_branches: true + condition: "$BUILD_DIST == true" diff --git a/.travis/after_success.sh b/.travis/after_success.sh new file mode 100755 index 000000000..8a46b3339 --- /dev/null +++ b/.travis/after_success.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -e +set -x + +source ~/.venv/bin/activate + +if [[ $BUILD_DIST == true ]]; then + python setup.py sdist bdist_wheel +fi