forked from platypush/platypush
Updated CI/CD pipeline - now using repo tokens to push new releases to pypi
This commit is contained in:
parent
c0039c3f87
commit
19a1e9c626
1 changed files with 8 additions and 2 deletions
|
@ -56,11 +56,17 @@ upload-pip-package:
|
|||
only:
|
||||
- tags
|
||||
script:
|
||||
# Update the CI/CD configuration
|
||||
- cd ~/platypush-ci-cd
|
||||
- git pull
|
||||
- cd -
|
||||
# Build the package
|
||||
- rm -rf build dist *.egg-info
|
||||
- export VERSION=$(grep -e '^\s*__version__\s*=' platypush/__init__.py | sed -r -e 's/^\s*__version__\s*=\s*.(.+?).\s*$/\1/')
|
||||
- source ~/.credentials/pypi.env
|
||||
- python setup.py sdist bdist_wheel
|
||||
# Upload to PyPI
|
||||
- twine upload ./dist/platypush-${VERSION}.tar.gz
|
||||
- twine upload --repository platypush ./dist/platypush-${VERSION}.tar.gz
|
||||
# Upload to the local package repository
|
||||
- TWINE_PASSWORD=$LOCAL_TWINE_PASSWORD TWINE_USERNAME=$LOCAL_TWINE_USERNAME twine upload --repository-url https://git.platypush.tech/api/v4/projects/3/packages/pypi dist/platypush-${VERSION}.tar.gz
|
||||
- TWINE_USERNAME=$LOCAL_TWINE_USERNAME TWINE_PASSWORD=$LOCAL_TWINE_PASSWORD twine upload --repository-url https://git.platypush.tech/api/v4/projects/3/packages/pypi dist/platypush-${VERSION}.tar.gz
|
||||
|
||||
|
|
Loading…
Reference in a new issue