From ae4cdda764c745daa2a4b6f46b5d9346dd5c6aad Mon Sep 17 00:00:00 2001
From: protoclown <ornano@felinn.org>
Date: Sun, 14 Apr 2024 12:24:57 +0200
Subject: [PATCH] chore: add a separate release job (Gitlab release only)

---
 .gitlab-ci.yml | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 640dce02..214e97f1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,8 +1,8 @@
 stages:
   - test
   - prepare
-  - release
   - docker
+  - release
 
 test:
   stage: test
@@ -57,3 +57,13 @@ docker:
   rules:
     - if: $CI_COMMIT_TAG && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
   needs: ["test"]
+
+release:
+  stage: release
+  image: node:alpine
+  script:
+    - export GITLAB_TOKEN=$CI_JOB_TOKEN
+    - npx release-it --ci --gitlab.release --no-git --no-npm --no-increment
+  rules:
+    - if: $CI_COMMIT_TAG && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
+  needs: ["test", "docker"]
-- 
GitLab