diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 720614120d6394e6f938d9c86f9aba012b2603d5..37da8e767eaaccf8e7814f1adf1dc3a1009b8810 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,42 +1,29 @@
 stages:
-  - build
   - test
-  - docs
   - publish
   - release
+  - pre_release
 
 before_script:
     - npm install
 
-build:
-  stage: build
-  script:
-    - npm run build
-  except:
-    variables:
-      - $GITLAB_USER_ID == $GIT_BOT_USER_ID
-
 test:
   stage: test
   script:
-    - npm run test:unit
-  except:
-    variables:
-      - $GITLAB_USER_ID == $GIT_BOT_USER_ID
-
-docs:
-  stage: docs
-  script:
-    - .\publishDocs.ps1 $GITLAB_TOKEN
+    - npm run build
+    - npm test
   except:
+    refs:
+      - master
+      - tags
     variables:
       - $GITLAB_USER_ID == $GIT_BOT_USER_ID
 
-
 publish:
   stage: publish
   script:
     - npm run build
+    - npm test
     - npx semantic-release
   only:
     - master
@@ -54,5 +41,14 @@ release:
   only:
     - tags
 
-after_script:
-    - Cmd /C "rmdir /S /Q node_modules"
\ No newline at end of file
+pre_release:
+  stage: pre_release
+  script:
+    - npm run build
+  artifacts:
+    paths:
+      - dist
+  when: manual
+  except:
+    - tags
+    - master