This repository was archived by the owner on Jan 2, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,31 @@ aliases:
117117 chmod +x ${HOME}/chromedriver
118118 sudo sh /tmp/workspaces/build/ci-scripts/install_selenium_dependencies.sh
119119
120+ # @see https://circleci.com/blog/continuously-deploying-python-packages-to-pypi-with-circleci/
121+ - &run_task_pypirc_configure
122+ run :
123+ name : init .pypirc
124+ command : |
125+ echo -e "[pypi]" >> ~/.pypirc
126+ echo -e "username = $PYPI_USER" >> ~/.pypirc
127+ echo -e "password = $PYPI_PASSWORD" >> ~/.pypirc
128+
129+ # @see https://tox.readthedocs.io/en/latest/install.html
130+ - &run_task_pypirc_install_dependencies
131+ run :
132+ name : install tox dependencies
133+ command : |
134+ sudo apt-get -qq update
135+ sudo apt install -y build-essential libssl-dev libpython-dev python python-pip
136+ sudo pip install twine
137+
138+ - &run_task_pypirc_upload_artefacts
139+ run :
140+ name : upload to pypi
141+ command : |
142+ twine upload /tmp/workspaces/dist/*
143+
144+
120145jobs :
121146
122147 # generate a changelog from existing github commits/pull requests
@@ -140,6 +165,16 @@ jobs:
140165 paths :
141166 - CHANGELOG.md
142167
168+ uploadpypi :
169+ << : *container_python
170+ working_directory : /tmp/workspaces/build
171+ steps :
172+ - attach_workspace :
173+ at : /tmp/workspaces
174+ - *run_task_pypirc_configure
175+ - *run_task_pypirc_install_dependencies
176+ - *run_task_pypirc_upload_artefacts
177+
143178 builddocs :
144179 << : *container_python
145180 working_directory : /tmp/workspaces/build
@@ -410,3 +445,6 @@ workflows:
410445 - create_gh_release :
411446 requires :
412447 - generate-changelog
448+ - uploadpypi :
449+ requires :
450+ - create_gh_release
You can’t perform that action at this time.
0 commit comments