add regular pypi deploy to github actions

This commit is contained in:
Bastien Gérard 2020-11-04 23:22:38 +01:00 committed by Bastien Gerard
parent 8f3d21c312
commit fd35df07c4
2 changed files with 22 additions and 19 deletions

View File

@ -92,8 +92,11 @@ jobs:
- run: |
pip install wheel
python setup.py sdist bdist_wheel
- uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/
- uses: pypa/gh-action-pypi-publish@master
if: github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v')
with:
password: ${{ secrets.pypi_password }}
repository_url: https://test.pypi.org/legacy/

View File

@ -88,21 +88,21 @@ branches:
- /^v.*$/
# Whenever a new release is created via GitHub, publish it on PyPI.
#deploy:
# provider: pypi
# user: the_drow
# password:
# secure: QMyatmWBnC6ZN3XLW2+fTBDU4LQcp1m/LjR2/0uamyeUzWKdlOoh/Wx5elOgLwt/8N9ppdPeG83ose1jOz69l5G0MUMjv8n/RIcMFSpCT59tGYqn3kh55b0cIZXFT9ar+5cxlif6a5rS72IHm5li7QQyxexJIII6Uxp0kpvUmek=
#
# # Create a source distribution and a pure python wheel for faster installs.
# distributions: "sdist bdist_wheel"
#
# # Only deploy on tagged commits (aka GitHub releases) and only for the parent
# # repo's builds running Python v3.7 along with PyMongo v3.x and MongoDB v3.4.
# # We run Travis against many different Python, PyMongo, and MongoDB versions
# # and we don't want the deploy to occur multiple times).
# on:
# tags: true
# repo: MongoEngine/mongoengine
# condition: ($PYMONGO = ${PYMONGO_3_11}) && ($MONGODB = ${MONGODB_3_4})
# python: 3.7
deploy:
provider: pypi
user: the_drow
password:
secure: QMyatmWBnC6ZN3XLW2+fTBDU4LQcp1m/LjR2/0uamyeUzWKdlOoh/Wx5elOgLwt/8N9ppdPeG83ose1jOz69l5G0MUMjv8n/RIcMFSpCT59tGYqn3kh55b0cIZXFT9ar+5cxlif6a5rS72IHm5li7QQyxexJIII6Uxp0kpvUmek=
# Create a source distribution and a pure python wheel for faster installs.
distributions: "sdist bdist_wheel"
# Only deploy on tagged commits (aka GitHub releases) and only for the parent
# repo's builds running Python v3.7 along with PyMongo v3.x and MongoDB v3.4.
# We run Travis against many different Python, PyMongo, and MongoDB versions
# and we don't want the deploy to occur multiple times).
on:
tags: true
repo: MongoEngine/mongoengine
condition: ($PYMONGO = ${PYMONGO_3_11}) && ($MONGODB = ${MONGODB_3_4})
python: 3.7