Skip to content

Commit 1e38743

Browse files
committed
Push pre-releases to test.pypi for every push on master
Signed-off-by: Ivan Kanakarakis <[email protected]>
1 parent a0fd030 commit 1e38743

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

.travis.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,21 @@ jobs:
5757
TRAVIS_PULL_REQUEST_SLUG: $TRAVIS_PULL_REQUEST_SLUG
5858
EOF
5959
60-
- stage: Deploy new release on GitHub
61-
if: type = push AND tag IS present
60+
- stage: Deploy new pre-release on PyPI
61+
if: type = push
6262
before_install: skip
6363
install: skip
64-
script: skip
64+
script:
65+
- read -r CURRENT_VERSION <VERSION
66+
- printf -- '%s-%s\n' "${CURRENT_VERSION}" "${TRAVIS_BUILD_NUMBER}" >VERSION
6567
deploy:
66-
- provider: releases
67-
token: "$GITHUB_RELEASE_TOKEN"
68+
- provider: pypi
69+
distributions: sdist bdist_wheel
70+
server: "https://test.pypi.org/legacy/"
71+
username: "__token__"
72+
password: "$PYPI_PRE_RELEASE_TOKEN"
6873
on:
6974
repo: IdentityPython/pysaml2
70-
tags: true
7175

7276
- stage: Deploy new release on PyPI
7377
if: type = push AND tag IS present
@@ -82,3 +86,15 @@ jobs:
8286
on:
8387
repo: IdentityPython/pysaml2
8488
tags: true
89+
90+
- stage: Deploy new release on GitHub
91+
if: type = push AND tag IS present
92+
before_install: skip
93+
install: skip
94+
script: skip
95+
deploy:
96+
- provider: releases
97+
token: "$GITHUB_RELEASE_TOKEN"
98+
on:
99+
repo: IdentityPython/pysaml2
100+
tags: true

0 commit comments

Comments
 (0)