From 30f468a029a91afcec583bafeff29164ad1ec5a5 Mon Sep 17 00:00:00 2001
From: Martin Weise <martin.weise@tuwien.ac.at>
Date: Sun, 29 Sep 2024 10:10:37 +0200
Subject: [PATCH] Give up, use script

---
 .gitlab-ci.yml            | 2 +-
 .gitlab/release-gitlab.sh | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)
 create mode 100644 .gitlab/release-gitlab.sh

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0ff50da0c2..adcf560efc 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -432,4 +432,4 @@ release-gitlab:
   before_script:
     - "apk add bash curl"
   script:
-    - bash -ec "curl -fsSL -X POST -H \"Content-Type: application/json\" -H \"PRIVATE-TOKEN: ${CI_TOKEN}\" --data '{\"name\": \"v${APP_VERSION}\", \"tag_name\": \"v${APP_VERSION}\", \"ref\": \"${CI_COMMIT_BRANCH}\", \"description\": \"Automated release from CI/CD\"}' https://gitlab.phaidra.org/api/v4/projects/450/releases"
\ No newline at end of file
+    - bash ./.gitlab/release-gitlab.sh
\ No newline at end of file
diff --git a/.gitlab/release-gitlab.sh b/.gitlab/release-gitlab.sh
new file mode 100644
index 0000000000..b7704d4eb9
--- /dev/null
+++ b/.gitlab/release-gitlab.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+GITLAB_URL="https://gitlab.phaidra.org"
+curl -fsSL \
+  -X POST \
+  -H "Content-Type: application/json" \
+  -H "PRIVATE-TOKEN: ${CI_TOKEN}" \
+  -d '{"name": "v${APP_VERSION}", "tag_name": "v${APP_VERSION}", "ref": "${CI_COMMIT_BRANCH}", "description": "Automated release from CI/CD"}' \
+  ${GITLAB_URL}/api/v4/projects/450/releases
-- 
GitLab