Skip to content

Commit

Permalink
[MRG] Deployment on master merge (#34)
Browse files Browse the repository at this point in the history
* Updated travis with deployment

* deployment script

* fixed version

* changed travis

* added deployment stuff back

* updated deployment script
  • Loading branch information
tommyod committed Nov 18, 2019
1 parent 7ea7b13 commit 8fb8dce
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
25 changes: 14 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ matrix:
services: docker
python: '3.7'

- os: linux
dist: xenial # required for Python 3.8 (travis-ci/travis-ci#9069)
sudo: required
services: docker
python: '3.8'

- os: osx
language: generic

Expand Down Expand Up @@ -58,15 +64,12 @@ install:
- $PYTHON -m pytest KDEpy --doctest-modules --capture=sys

# Linting
before_script:
- $PYTHON -m flake8 --show-source --ignore=F811,W293,W391,W292,W291,W504,W503 --max-line-length=88 --exclude="*examples.py,testing.py,*kde.py" KDEpy

# If a tag was used, build wheels and deply to pypi
script:
- echo "$TRAVIS_TAG"
- if [ -n "$TRAVIS_TAG" ]; then
$PIP install cibuildwheel;
$PYTHON -m cibuildwheel --output-dir wheelhouse;
$PIP install twine;
$PYTHON -m twine upload dist/* -u tommyod -p $TWINE_PASSWORD --skip-existing;
fi
- $PYTHON -m flake8 --show-source --ignore=F811,W293,W391,W292,W291,W504,W503 --max-line-length=88 --exclude="*examples.py,testing.py,*kde.py" KDEpy

# -------------------- deploy: deploy to PyPI ---------
deploy:
provider: script
script: . deploy.sh
on:
branch: master
6 changes: 6 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
$PIP install cibuildwheel;
$PYTHON -m cibuildwheel --output-dir wheelhouse;
$PIP install twine;
$PYTHON -m twine upload dist/* -u tommyod -p $TWINE_PASSWORD --skip-existing;
$PYTHON -m twine upload wheelhouse/* -u tommyod -p $TWINE_PASSWORD --skip-existing;

0 comments on commit 8fb8dce

Please sign in to comment.