From 1b2aa0dbebf8a3383b38c0686b3e9bef8b048f80 Mon Sep 17 00:00:00 2001
From: Remi Planel <rplanel@pasteur.fr>
Date: Thu, 14 Nov 2019 16:31:43 +0100
Subject: [PATCH] deploy when release tag added

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

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3eab7cf..5644073 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,10 +1,5 @@
 image: python:3.7
 
-cache:
-  paths:
-    - .venv
-  key: "${CI_COMMIT_REF_SLUG}"
-
 stages:
   - test
   - deploy
@@ -17,3 +12,11 @@ test:
   stage: test
   script:
     - poetry run pytest
+
+deploy:
+  stage: deploy
+  script:
+    - echo "deploy"
+    - poetry build -v
+  rules:
+    - if: '$CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+$/'
-- 
GitLab