From 551d673b84f97c6a6a809e1f5a95c0792b0f899d Mon Sep 17 00:00:00 2001
From: Thomas Lambert <t.lambert@uliege.be>
Date: Fri, 25 Nov 2022 22:31:11 +0100
Subject: [PATCH] ci: fix issue

---
 .gitlab-ci.yml | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 736efd6..65583c8 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -3,15 +3,32 @@
 # TODO: Lint check for arduino
 # TODO: Arduino-build
 
+# .setup_env: &setup_env
+#   - echo "Setup the environment"
+
 stages:
   - release
 
+# build:
+#   stage: build
+#   before_script:
+#     - *setup_env
+#   script:
+#     - echo "Building Arduino code"
+#
+# lint:
+#   stage: test
+#   before_script:
+#     - *setup_env
+#   script:
+#     - echo "Style verification"
+
 # https://docs.gitlab.com/ee/user/project/releases/release_cicd_examples.html
 release_job:
   stage: release
   image: registry.gitlab.com/gitlab-org/release-cli:latest
   rules:
-    - if: $CI_COMMIT_TAG   # Run this job when a tag is created
+    - if: '$CI_COMMIT_REF_NAME == "main" && $CI_COMMIT_TAG'
   script:
     - echo "running release_job"
   release:
-- 
GitLab