diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index be740fc8d3accdc55e8f8e54c880ea16ac81a69f..5992b4853c8e3796217414fc77d526ff62b257e1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,11 +1,3 @@
-.release-rules: &release-rules
-  # rule to run job on a tag-reference which has the form number.number.number (semantic versioning)
-  # or number.number.number-text (semantic versioning + release-name)
-  # and where a Dockerfile exists
-  - if: $CI_COMMIT_TAG =~ /^\d+[.]\d+[.]\d+$/ || $CI_COMMIT_TAG =~ /^\d+[.]\d+[.]\d+[-]\S+$/
-    exists:
-      - Dockerfile
-
 stages:
   - build
   - test
@@ -19,6 +11,14 @@ stages:
   - pip install poetry
   - poetry install --no-interaction
 
+.release_rules: &release_rules
+  # rule to run job on a tag-reference which has the form number.number.number (semantic versioning)
+  # or number.number.number-text (semantic versioning + release-name)
+  # and where a Dockerfile exists
+  - if: $CI_COMMIT_TAG =~ /^\d+[.]\d+[.]\d+$/ || $CI_COMMIT_TAG =~ /^\d+[.]\d+[.]\d+[-]\S+$/
+    exists:
+      - Dockerfile
+
 build-openapi-scheme:
   stage: build
   image: python:3.11-slim
@@ -113,7 +113,7 @@ docker-push:
       docker push $AURA_IMAGE_NAME:$CI_COMMIT_TAG
       fi
   rules:
-    - *release-rules
+    - *release_rules
     # every commit on master/main or feature branch should trigger a push
     - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME =~ /^feat/
       exists:
@@ -124,7 +124,7 @@ release_job:
   needs:
     - docker-push
   image: registry.gitlab.com/gitlab-org/release-cli:latest
-  rules: *release-rules
+  rules: *release_rules
   script:
     - echo "this will be a release when there is a tag, but tags should be protected to be only createable by maintainers."
   release: