Skip to content

Commit

Permalink
use job variables for PyPI authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
mlange-42 committed Sep 26, 2023
1 parent cf11d3d commit ea5d5d1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit ea5d5d1

Please sign in to comment.