16
16
# (`test` is basically a travis default default so we don't need to name it).
17
17
# But we do want a `deploy` stage that only runs if the the commit is tagged
18
18
# (with a label that begins `pypi-` and it's on the master branch).
19
- # Our tags for PyPI distributions will be of the form `pypi-1.0.1`.
19
+ # Our tags for PyPI distributions will be of the form `pypi-1.0.1`.
20
20
stages :
21
21
- name : test
22
22
if : not tag is present
23
23
- name : deploy
24
+ if : tag =~ ^pypi*$ and branch = master
24
25
25
26
# Run Travis on all branches
26
- # (normally it only runs on master)
27
+ # (normally it only runs on master)
27
28
branches :
28
29
only :
29
30
- " /.*/"
@@ -45,7 +46,7 @@ script:
45
46
46
47
# Execution jobs.
47
48
# Let's run the script against various Python versions
48
- # and then move to our deploy stage. Travis will only run the deploy stage
49
+ # and then move to our deploy stage. Travis will only run the deploy stage
49
50
# when the test stages have passed. Deployment will also only execute
50
51
# if this triggering commit is tagged and we're on the master branch.
51
52
jobs :
@@ -54,15 +55,18 @@ jobs:
54
55
- python : 3.5
55
56
- python : 3.6
56
57
57
- before_deploy :
58
- - cd ${TRAVIS_BUILD_DIR}/src/python
59
-
60
- deploy :
61
- on :
62
- branch : master
63
- condition : $TRAVIS_TAG =~ ^pypi*$
64
- provider : pypi
65
- user : informaticsmatters
66
- password :
67
- secure : " FgNbSAEtomSpBwIF26CXF1f+8z4FWAYVC6aae5ZTTRvUA9rjhj64OKzdxe4hRYnrw4PLk615wNbJSwDm4NQds8hX2MJxwSa+oLOdwuDXq4dYikJuT1YIaMgNAKN+gjLNEf+vSpLDbyG8QIJgLgjEHVx5rxNrvGglXPg52jN1mVZvoL79UXgHzjFmlG0UuaU5AEUL57Sv9NX5iOUAdHWr+v5hNmeAq0Nz92e4O2byLoizCsdbPd20K9P56aL/Lo/hwO1mVcR5BLz2/oQBynMiQGlp+yrg+lbxc3HSYUaM/hMvwK08Y5ITkQzoqNoClyeuw43FsqInvs8DjGRFCZNOpf1gWSNY7bHjIUvCqVLPZu5Cd76B0SQCd8guFwDawOc0HWKc1g7P1XZ3h2BH6XkiPohJT2zSdYboRwSHY658dobJXcj5Q4ZUp73qhRoKb/8XXVUzQwYCp2Hp3dRvuGjJXVCb5VX4VzJQXJqMHjK8+Z0QzPvN+YOoAEFgE3Yxjykov3TeSs+AHdLTHq9osWv/zAPGSVxzBjgFnUp8qT8iwz5gPlYqukHudvQx2nJAH73CVSDJYCiecYqVFdPxFw7xCg2MYCqlrlvONMsSEPGssyngX8gKzrSQxmunCf3r0QzHl9/mXvndHEOQyI1NmzNHPB8+FItYT1UlOnIcr9eOC8k="
68
- distributions : bdist_wheel
58
+ - stage : deploy
59
+ python : 3.6
60
+ # No need to re-run scripted commands here.
61
+ # They're all part of the above test stages.
62
+ script : skip
63
+ # Our module and setup.py is not located in the root of the project.
64
+ # Move to it before we deploy.
65
+ before_deploy :
66
+ - cd ${TRAVIS_BUILD_DIR}/src/python
67
+ deploy :
68
+ provider : pypi
69
+ user : informaticsmatters
70
+ password :
71
+ secure : " FgNbSAEtomSpBwIF26CXF1f+8z4FWAYVC6aae5ZTTRvUA9rjhj64OKzdxe4hRYnrw4PLk615wNbJSwDm4NQds8hX2MJxwSa+oLOdwuDXq4dYikJuT1YIaMgNAKN+gjLNEf+vSpLDbyG8QIJgLgjEHVx5rxNrvGglXPg52jN1mVZvoL79UXgHzjFmlG0UuaU5AEUL57Sv9NX5iOUAdHWr+v5hNmeAq0Nz92e4O2byLoizCsdbPd20K9P56aL/Lo/hwO1mVcR5BLz2/oQBynMiQGlp+yrg+lbxc3HSYUaM/hMvwK08Y5ITkQzoqNoClyeuw43FsqInvs8DjGRFCZNOpf1gWSNY7bHjIUvCqVLPZu5Cd76B0SQCd8guFwDawOc0HWKc1g7P1XZ3h2BH6XkiPohJT2zSdYboRwSHY658dobJXcj5Q4ZUp73qhRoKb/8XXVUzQwYCp2Hp3dRvuGjJXVCb5VX4VzJQXJqMHjK8+Z0QzPvN+YOoAEFgE3Yxjykov3TeSs+AHdLTHq9osWv/zAPGSVxzBjgFnUp8qT8iwz5gPlYqukHudvQx2nJAH73CVSDJYCiecYqVFdPxFw7xCg2MYCqlrlvONMsSEPGssyngX8gKzrSQxmunCf3r0QzHl9/mXvndHEOQyI1NmzNHPB8+FItYT1UlOnIcr9eOC8k="
72
+ distributions : bdist_wheel
0 commit comments