diff --git a/ci/build_dist.yml b/ci/build_dist.yml
index 7bdf76e85f1dba73e3f81b7c516a4abe3dbb3bb7..ec4a102bffeb9f86032fac4bf50b16e48a1fcddd 100644
--- a/ci/build_dist.yml
+++ b/ci/build_dist.yml
@@ -10,11 +10,6 @@ build_dist:
        fi ;
       fi
     - tox -e build
-    - if [ $CI_COMMIT_REF_NAME = master ]; then
-       poetry publish -r gitlab ;
-      elif [ x$CI_OMMIT_REF_NAME = x$CI_COMMIT_TAG ]; then
-       poetry publish ;
-      fi
   artifacts:
     paths:
       - dist/
diff --git a/ci/deploy_pypi.yml b/ci/deploy_pypi.yml
new file mode 100644
index 0000000000000000000000000000000000000000..6b235ad05fe3eb2d70f706a93fedd91219cd6605
--- /dev/null
+++ b/ci/deploy_pypi.yml
@@ -0,0 +1,11 @@
+deploy_pypi:
+  stage: deploy
+  script:
+    - if [ $CI_COMMIT_REF_NAME = master ]; then
+       poetry publish -r gitlab ;
+      elif [ x$CI_OMMIT_REF_NAME = x$CI_COMMIT_TAG ]; then
+       poetry publish ;
+      fi
+  only:
+    - master
+    - tags