From 424e67e23ae19e600efbbd2a79b6142edfe64ff1 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Fri, 29 Nov 2019 11:35:30 -0800 Subject: [PATCH] [#757] Move deploy to it's own stage on CI so it doesn't run multiple times --- .travis.yml | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index 297ce340..b10cb9b2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,6 +30,25 @@ jobs: - pip install poetry~=0.12.17 env: - PATH=/c/Python37:/c/Python37/Scripts:$PATH + - stage: "Deploy" + before_deploy: + - poetry config http-basic.pypi $PYPI_USER $PYPI_PASS + - poetry version $TRAVIS_TAG + - poetry build + deploy: + - provider: script + script: poetry publish + skip_cleanup: true + on: + branch: master + tags: true + after_deploy: + - git config --global user.email "jrnl.bot@gmail.com" + - git config --global user.name "Jrnl Bot" + - git checkout master + - git add pyproject.toml + - git commit -m "Incrementing version to ${TRAVIS_TAG}" + - git push https://${GITHUB_TOKEN}@github.com/jrnl-org/jrnl.git master allow_failures: - python: 3.8 - python: nightly @@ -47,21 +66,4 @@ install: - poetry run python --version script: - poetry run behave -before_deploy: - - poetry config http-basic.pypi $PYPI_USER $PYPI_PASS - - poetry version $TRAVIS_TAG - - poetry build -deploy: - - provider: script - script: poetry publish - skip_cleanup: true - on: - branch: master - tags: true -after_deploy: - - git config --global user.email "jrnl.bot@gmail.com" - - git config --global user.name "Jrnl Bot" - - git checkout master - - git add pyproject.toml - - git commit -m "Incrementing version to ${TRAVIS_TAG}" - - git push https://${GITHUB_TOKEN}@github.com/jrnl-org/jrnl.git master +