From 19a1e9c626d841f7cacfcce6f47b7a1f73eba852 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 1 Mar 2022 12:50:13 +0100 Subject: [PATCH] Updated CI/CD pipeline - now using repo tokens to push new releases to pypi --- .gitlab-ci.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2ed96c17c..acbbee3f7 100644 --- a/.gitlab-ci.yml +++ b/.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 +