diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 36b38274b44ff62a0310559591fdab3424c44cc3..a4626a8e620272cc8b86edca97674a4e6afeba7d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -43,7 +43,6 @@ run-pre-commit:
   <<: *quality
   script: make check
 
-
 # Tests jobs
 
 python3.9:
@@ -64,7 +63,8 @@ publish:
   <<: *install-deps
   stage: publish
   image: python:3.10
-  only: /^v(\d+\.)?(\d+\.)?(\*|\d+)$/
+  only:
+    - /^v(\d+\.)(\d+\.)(\d+)$/
   script:
     - make build
-    - poetry publish -username=__token__ --password=$PYPI_TOKEN
+    - poetry publish -username=__token__ --password=$PYPI_TOKEN
\ No newline at end of file