Updated CI/CD pipeline - now using repo tokens to push new releases to pypi

29-generic-entities-support
Fabio Manganiello 9 months ago
parent c0039c3f87
commit 19a1e9c626
Signed by untrusted user: blacklight
GPG Key ID: D90FBA7F76362774
  1. 10
      .gitlab-ci.yml

@ -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…
Cancel
Save