Skip to content

Commit

Permalink
Merge branch 'use-twine-variables' into 'main'
Browse files Browse the repository at this point in the history
Use job variables for PyPI authentication

See merge request FINAM/finam!268
  • Loading branch information
mlange-42 committed Sep 26, 2023
2 parents cf11d3d + ea5d5d1 commit 1ac8fde
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 1ac8fde

Please sign in to comment.