Skip to content

Commit 266cfc3

Browse files
committed
Auto deploys to PyPI using Travis on tags
Uses PyPI `__token__` and Travis auto deployment to publish to PyPI upon tagging. https://pypi.org/help/#apitoken Travis uses the not so well documented `PYPI_PASSWORD` environment variable to store the password. https://github.com/travis-ci/dpl/blob/v1.10.15/lib/dpl/provider/pypi.rb#L12 The variable was set with a valid token prior this change. https://travis-ci.org/github/kivy/python-for-android/settings This is more secure than user and password as tokens are generated with uploaded only permissions and can be scoped to a given project.
1 parent 6fae684 commit 266cfc3

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ python_for_android.egg-info
1818
/build/
1919
doc/build
2020
__pycache__/
21+
venv/
2122

2223
#idea/pycharm
2324
.idea/

.travis.yml

+12
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,15 @@ jobs:
5858
- <<: *testapps
5959
name: Rebuild updated recipes
6060
script: travis_wait 30 make docker/run/make/rebuild_updated_recipes
61+
62+
# Deploy to PyPI using token set in `PYPI_PASSWORD` environment variable
63+
# https://pypi.org/manage/account/token/
64+
# https://travis-ci.org/github/kivy/python-for-android/settings
65+
deploy:
66+
provider: pypi
67+
distributions: sdist bdist_wheel
68+
user: "__token__"
69+
on:
70+
tags: true
71+
repo: kivy/python-for-android
72+
python: 3.7

0 commit comments

Comments
 (0)