diff --git a/templates/gitlab-ci-semrel.yml b/templates/gitlab-ci-semrel.yml
index b88d0e86c7f930e1a1a1d60b8104ab3a90836e07..5a9a58001907d56b49c695e63ba8cd2a85bc9cfe 100644
--- a/templates/gitlab-ci-semrel.yml
+++ b/templates/gitlab-ci-semrel.yml
@@ -695,7 +695,7 @@ stages:
     # Generating the hook scripts that will generate the dotenv file
     # The dotenv file is generated in $TMPDIR so it will survive the git reset
     dotenv_tmp="$(mktemp -t semrel-info-XXXXXXXXXX.dotenv)"
-
+    commitPresetConfig=$(generate_commit_preset_conf)
     export_last_version_hook_script="./export-last-version.sh"
     {
       echo "#!/bin/bash"
@@ -727,16 +727,13 @@ stages:
       echo ""
       echo "# injected (replace your plugins) plugins by the template to generate dotenv"
       echo ""
-      echo "plugins: ["
-      echo "  \"@semantic-release/commit-analyzer\","
-      echo "  ["
-      echo "    \"@semantic-release/exec\","
-      echo "    {"
-      echo "      \"analyzeCommitsCmd\": \"${export_last_version_hook_script} \\\"\${lastRelease.version}\\\"\"",
-      echo "      \"verifyReleaseCmd\": \"${export_next_version_hook_script} \\\"\${nextRelease.version}\\\" \\\"\${nextRelease.type}\\\"\""
-      echo "    }"
-      echo "  ],"
-      echo "]"
+      echo "plugins:"
+      echo "  - - '@semantic-release/commit-analyzer'"
+      echo "${commitPresetConfig}"
+      echo "  - - '@semantic-release/exec'"
+      echo "    - analyzeCommitsCmd: '\"${export_last_version_hook_script}\" \"\${lastRelease.version}\"'"
+      echo "      verifyReleaseCmd: '\"${export_next_version_hook_script}\" \"\${nextRelease.version}\" \"\${nextRelease.type}\"'"
+      echo ""
     } >> "${releaserc_file}.new"
 
     mv -f "${releaserc_file}.new" ".releaserc"