From a37f46e51bdfc9ac247ef777e594849ed63f4a65 Mon Sep 17 00:00:00 2001 From: Leopold Talirz Date: Thu, 7 Nov 2019 13:25:21 +0100 Subject: [PATCH 1/2] add automatic PyPI deployment --- .travis.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.travis.yml b/.travis.yml index ae1007484..93b447487 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,3 +22,33 @@ script: # check whether generated schema matches the committed version - .ci/openapi_diff.sh - codecov --token=$CODECOV_TOKEN + +# Automatically deploy tags to PyPI +jobs: + include: + - stage: deploy + # Make sure the tag is valid semver + if: "tag =~ ^v[0-9]+\\.[0-9]+\\.[0-9]+(a|b|rc)?[0-9]*$" + services: ignore + addons: skip + python: 3.7 + before_install: skip + install: skip + before_script: skip + script: skip + env: ignore + before_deploy: + - echo "About to deploy $TRAVIS_TAG to PyPI" + after_deploy: + - echo "Deployed $TRAVIS_TAG to PyPI" + # See https://docs.travis-ci.com/user/deployment/pypi/ + deploy: &pypi + provider: pypi + skip_existing: true + user: "__token__" + password: + secure: jydagLMQt10k0l/XlVqYznqnfRpXDsnrPIDzxREBMwnoCWBvx7a+X/pEg2wFWMD3uY3/Qhev8dr6+RBgX0t1N0si4TpBMFKGkilMebRbHkkbdgRA19NSQTdgj3jml+3K095i1LO8xR7bSfn/XHZ+oN02EDdhCGEDnCLMoG9AGKLX0w/8lNu4clQxHMQ2hSTeT9imJrD6kZDDTJwMS6twF6QLwE7YowfaPRlqIn6EYjQJjDYLE6Px95v9WBeCdNuL6Yr+ojO8uiQvmj1WdpnxVG1LBYtpx3R5cb2bbj/Q8WAYniXmJGeB0lnOMqtmbDire3kZcn40JfJMJ47bNY79APkQqTylxByv1NomeCf3h4UQ0Ylr3kaKufif+PCixl7yG1YUrnOeE2Rzvtr9YyN9uJ8solpVooOtKnwWQwCkS/pcyi8h2CyfdSBLDlWai7ShkQHRCf2YDqxctyPbqaSar6ezUwT1lKtaFNdPaNfl6Au/PVJMr0ANp3Bfl74EXzoajzc9SlJBbAg/CRTbGq+Mfa8hZUtMwkSJCGcrcqz18x6rlTek/p/fmic8fdVjLSiD4V75q2r6ZrHT7OvmHUxDJ4JA4GwuWFMLNC4813ydXaC+rk3h4MxRnskSVs1v5YcBnb/7DudVWQa6ZAAOesbjqRtj8RfMLWrxW8BvBUUwKyI= + on: + repo: Materials-Consortia/optimade-python-tools + all_branches: true + tags: true From c72a55e4440180e7a6fc289d61402538d654d5ac Mon Sep 17 00:00:00 2001 From: Leopold Talirz Date: Fri, 8 Nov 2019 15:03:28 +0100 Subject: [PATCH 2/2] restrict deployments to master branch --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 93b447487..47c6221cd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,5 +50,5 @@ jobs: secure: jydagLMQt10k0l/XlVqYznqnfRpXDsnrPIDzxREBMwnoCWBvx7a+X/pEg2wFWMD3uY3/Qhev8dr6+RBgX0t1N0si4TpBMFKGkilMebRbHkkbdgRA19NSQTdgj3jml+3K095i1LO8xR7bSfn/XHZ+oN02EDdhCGEDnCLMoG9AGKLX0w/8lNu4clQxHMQ2hSTeT9imJrD6kZDDTJwMS6twF6QLwE7YowfaPRlqIn6EYjQJjDYLE6Px95v9WBeCdNuL6Yr+ojO8uiQvmj1WdpnxVG1LBYtpx3R5cb2bbj/Q8WAYniXmJGeB0lnOMqtmbDire3kZcn40JfJMJ47bNY79APkQqTylxByv1NomeCf3h4UQ0Ylr3kaKufif+PCixl7yG1YUrnOeE2Rzvtr9YyN9uJ8solpVooOtKnwWQwCkS/pcyi8h2CyfdSBLDlWai7ShkQHRCf2YDqxctyPbqaSar6ezUwT1lKtaFNdPaNfl6Au/PVJMr0ANp3Bfl74EXzoajzc9SlJBbAg/CRTbGq+Mfa8hZUtMwkSJCGcrcqz18x6rlTek/p/fmic8fdVjLSiD4V75q2r6ZrHT7OvmHUxDJ4JA4GwuWFMLNC4813ydXaC+rk3h4MxRnskSVs1v5YcBnb/7DudVWQa6ZAAOesbjqRtj8RfMLWrxW8BvBUUwKyI= on: repo: Materials-Consortia/optimade-python-tools - all_branches: true + branch: master tags: true