From 7b079c8b531cd1fd34564bf7e76a848907fac547 Mon Sep 17 00:00:00 2001
From: Dzianis Bartashevich <bartashevich@av.it.pt>
Date: Wed, 20 Mar 2019 15:50:22 +0000
Subject: [PATCH] git tag implementation

---
 .gitlab-ci.yml | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a5368e15..7081fd92 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -27,21 +27,30 @@ before_script:
 
 stages:
   - pages
+  - deploy
 
 pages:
   tags:
     - docker-executor
   stage: pages
-  variables:
-    TWINE_USERNAME: $TWINE_USERNAME
-    TWINE_PASSWORD: $TWINE_PASSWORD
   script:
     - make test
     - ls -la
     - mv build public
     - mv public/lmcbaseclasses_htmlcov/* public
     - make push
-    - twine upload --repository-url $PYPI_REPOSITORY_URL dist_test/*
   artifacts:
     paths:
       - public
+
+registry_deploy:
+  tags:
+    - docker-executor
+  stage: deploy
+  variables:
+    TWINE_USERNAME: $TWINE_USERNAME
+    TWINE_PASSWORD: $TWINE_PASSWORD
+  script:
+    - twine upload --repository-url $PYPI_REPOSITORY_URL dist_test/*
+  only:
+    - tags
\ No newline at end of file
-- 
GitLab