From fc931cd98fba65b97c4d0f0960ed6faff6b8b6c4 Mon Sep 17 00:00:00 2001
From: manuelpett <manuel.petit@inria.fr>
Date: Tue, 14 Jan 2025 20:55:37 +0100
Subject: [PATCH] Fix gitlab-ci YAML syntax

---
 .gitlab-ci.yml | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d20dae4..69a6eb3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -114,15 +114,20 @@ create_release:
   script:
     - echo "Creating release and attaching tutorials.zip..."
     - echo "Using tag $CI_COMMIT_TAG"
-    - curl --header "PRIVATE-TOKEN: $CI_JOB_TOKEN" --upload-file tutorials.zip "$CI_API_V4_URL/projects/$CI_PROJECT_ID/uploads" > upload_response.json
-    - UPLOAD_URL=$(jq -r '.url' upload_response.json)  # Extract the uploaded URL path using jq
+    - >
+      curl --header "PRIVATE-TOKEN: $CI_JOB_TOKEN"
+      --upload-file tutorials.zip
+      "$CI_API_V4_URL/projects/$CI_PROJECT_ID/uploads" > upload_response.json
+    - echo "Reading uploaded URL from the response JSON..."
+    - UPLOAD_URL=$(jq -r '.url' upload_response.json)
     - echo "ZIP File uploaded and accessible at: $UPLOAD_URL"
-    - |
-      release-cli create \
-        --name "Release TEST-${CI_COMMIT_REF_NAME}" \
-        --tag-name "TEST-${CI_COMMIT_REF_NAME}" \
-        --description "## Test Release\nThis is a test release from the hotfix branch." \
-        --assets-link "{\"name\":\"tutorials.zip\", \"url\":\"${CI_PROJECT_URL}${UPLOAD_URL}\"}"
+    - echo "Running release-cli to create the release..."
+    - >
+      release-cli create
+      --name "Release TEST-${CI_COMMIT_REF_NAME}"
+      --tag-name "TEST-${CI_COMMIT_REF_NAME}"
+      --description "## Test Release\nThis is a test release from the hotfix branch."
+      --assets-link "{\"name\":\"tutorials.zip\",\"url\":\"${CI_PROJECT_URL}${UPLOAD_URL}\"}"
   rules:
     - if: '$CI_COMMIT_REF_NAME == "hotfix/fix-doc-installation"'  # Test only on your hotfix branch
       when: always
-- 
GitLab