diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 81bf1a6fe92ff16f7d7a661a7decc83bc6ec4a6d..3dcfeef100f648753b43ebae785864cb2dd86de6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,7 +26,7 @@ build: - apt-get -y update - command -v git || apt-get -y install git - command -v python3 || apt-get -y install python3 - - command -v pip3 || apt-get -y install python3-pip twine python3-build + - command -v pip3 || apt-get -y install python3-pip python3-build - command -v curl || apt-get -y install curl - command -v bsdtar || apt-get -y install libarchive-tools - python3 -V # Print out python version for debugging @@ -55,8 +55,11 @@ upload: - apt-get -y update - command -v git || apt-get -y install git - command -v twine || apt-get -y install twine + - python3 -m venv || apt-get -y install python3-venv + - python3 -m venv venv + - venv/bin/pip3 install twine script: - - TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token twine upload --verbose --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi --skip-existing dist/* + - TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token venv/bin/twine upload --verbose --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi --skip-existing dist/* needs: - job: build artifacts: true