From 23d1a0e59c771cc0b2291ab2ce2a1022532af60f Mon Sep 17 00:00:00 2001 From: Marc Feger <marc.feger@hhu.de> Date: Tue, 23 Nov 2021 13:40:18 +0000 Subject: [PATCH] Update .gitlab-ci.yml to have a deploy stage for pypi --- .gitlab-ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2356bc3..3f6eb6f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,7 @@ services: stages: - build - test + - deploy before_script: - docker version @@ -33,3 +34,17 @@ test: - echo "Testing ..." - docker-compose -f docker-compose.ci.yml pull - docker-compose -f docker-compose.ci.yml run web sh -c "poetry run python manage.py makemigrations && poetry run python manage.py migrate && poetry run python manage.py test core -v 2" + +deploy: + stage: deploy + needs: + - test + script: + - echo "Deploying ..." + - cd ./the_social_network + - mw ./the_social_network ./not_needed + - mw ./core ./the_social_network + - pip install poetry + - poetry --version + - poetry config pypi-token.pypi __token__ $PYPI_TOKEN + - poetry publish -- GitLab