Skip to content

Commit 8b57840

Browse files
author
Hugo Osvaldo Barrera
committed
Fix travis not pushing releases properly
1 parent 9cec467 commit 8b57840

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

.travis.yml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ cache: pip
44

55
python: 3.6
66

7+
stages:
8+
- test
9+
- name: deploy
10+
if: tag IS present
11+
712
install:
813
- pip install flake8 flake8-import-order
914

@@ -14,18 +19,16 @@ before_deploy:
1419
- pip install wheel
1520
- python setup.py sdist bdist_wheel
1621

17-
deploy:
18-
- provider: pypi
19-
user: $PYPI_USERNAME
20-
password: $PYPI_PASSWORD
21-
on:
22-
tags: true
23-
distributions: "sdist bdist_wheel"
24-
- provider: releases
25-
api_key: $GITHUB_OAUTH_TOKEN
26-
file_glob: true
27-
file: dist/*
28-
skip_cleanup: true
29-
on:
30-
tags: true
31-
distributions: "sdist bdist_wheel"
22+
jobs:
23+
include:
24+
- stage: deploy
25+
script:
26+
- pip install wheel twine
27+
- python setup.py sdist bdist_wheel
28+
- twine upload -u $PYPI_USERNAME -p $PYPI_PASSWORD dist/*
29+
- stage: deploy
30+
script:
31+
- pip install wheel
32+
- python setup.py sdist bdist_wheel
33+
- gem install dpl
34+
- dpl --api-key=$GITHUB_OAUTH_TOKEN --provider=releases --file=dist/* --file_glob=true --skip_cleanup=true

0 commit comments

Comments
 (0)