From ea5d5d173ce9e6067709b84c7c95decc7561bebe Mon Sep 17 00:00:00 2001 From: Martin Lange Date: Tue, 26 Sep 2023 11:15:01 +0200 Subject: [PATCH] use job variables for PyPI authentication --- .gitlab-ci.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f6a6122..ecfae1c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -98,11 +98,14 @@ build: pypi_test_release: stage: release + variables: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${TEST_PYPI_TOKEN} dependencies: - build script: - pip install twine - - python -m twine upload --skip-existing -r testpypi -u __token__ -p ${TEST_PYPI_TOKEN} dist/* + - python -m twine upload --skip-existing -r testpypi dist/* artifacts: paths: - dist @@ -112,11 +115,14 @@ pypi_test_release: pypi_release: stage: release + variables: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${PYPI_TOKEN} dependencies: - build script: - pip install twine - - python -m twine upload -u __token__ -p ${PYPI_TOKEN} dist/* + - python -m twine upload dist/* artifacts: paths: - dist