From ee03119ca365b56962e6ce30199bda5cbc690072 Mon Sep 17 00:00:00 2001
From: Martin Weise <martin.weise@tuwien.ac.at>
Date: Sat, 28 Sep 2024 17:48:15 +0200
Subject: [PATCH] Added logic to release gitlab release in pipeline

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

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9f048df9a4..6274b98959 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -421,3 +421,15 @@ release-libs:
   script:
     - bash ./lib/python/package.sh
     - bash ./lib/python/release.sh
+
+release-gitlab:
+  stage: release
+  image: docker.io/alpine:3.18
+  when: manual
+  only:
+    refs:
+      - /^release-.*/
+  before_script:
+    - "apk add bash curl"
+  script:
+    - "curl -fsSL -X POST -H 'Content-Type: application/json' -H 'PRIVATE-TOKEN: ${CI_TOKEN}' --data \"{'name': 'v${APP_VERSION}', 'tag_name': 'v${CI_COMMIT_BRANCH}', 'ref': '${CI_COMMIT_BRANCH}', 'description': 'Automated release from CI/CD'}\" https://gitlab.phaidra.org/api/v4/projects/450"
\ No newline at end of file
-- 
GitLab