From e4772dfef8205ad047adb718f70feb58dde3de1f Mon Sep 17 00:00:00 2001 From: Bryan Brancotte <bryan.brancotte@pasteur.fr> Date: Wed, 6 Mar 2024 13:45:40 +0100 Subject: [PATCH] upload to pypi --- .gitlab-ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ad8ee64..38e6a61 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,3 +32,18 @@ upload: - sed -i "s/v0.0.1-dev/$CI_COMMIT_TAG/g" src/__init__.py - python -m build - python -m twine upload --verbose --repository-url ${PRIVATE_REGISTRY_API_URL} dist/* + + + +upload-to-pypi: + extends: upload + variables: + PRIVATE_REGISTRY_API_URL: "https://pypi.org" + TWINE_PASSWORD: "${PYPI_TOKEN_PASSWORD}" + TWINE_USERNAME: "__token__" + before_script: + - > + if [[ -z "$TWINE_PASSWORD" ]]; then + echo "No token provided, cannot upload" + exit 1 + fi -- GitLab