From 13e99d79e274734f0953be6998db7170219f3d17 Mon Sep 17 00:00:00 2001
From: Volker Schukai <volker.schukai@schukai.com>
Date: Thu, 4 Jan 2024 18:03:14 +0100
Subject: [PATCH] fix: update ci #11

---
 .gitlab-ci.yml | 11 +++++------
 devenv.nix     | 15 +++++++--------
 2 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index dca0698..7e19dcb 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -27,7 +27,7 @@
     rules:
       - if: '$CI_COMMIT_TAG'
         when: never
-      - if: '$CI_COMMIT_MESSAGE =~ /NOT_TAGIT/'
+      - if: '$CI_COMMIT_MESSAGE =~ /RELEASE_IT/'
         when: never
       - when: on_success
 
@@ -36,11 +36,10 @@
     tags:
       - nixos
     stage: release
-    #image:
-    #  name: goreleaser/goreleaser
-    #  entrypoint: [""]
-    only:
-      - tags
+    rules:
+      - if: '$CI_COMMIT_MESSAGE =~ /RELEASE_IT/'
+        when: on_success
+      - when: never
     variables:
       # Disable shallow cloning so that goreleaser  can diff between tags to
       GIT_DEPTH: 0
diff --git a/devenv.nix b/devenv.nix
index 16bc746..7f87965 100644
--- a/devenv.nix
+++ b/devenv.nix
@@ -145,7 +145,7 @@ tasks:
           rules:
             - if: '$CI_COMMIT_TAG'
               when: never
-            - if: '$CI_COMMIT_MESSAGE =~ /NOT_TAGIT/'
+            - if: '$CI_COMMIT_MESSAGE =~ /RELEASE_IT/'
               when: never
             - when: on_success
 
@@ -154,11 +154,10 @@ tasks:
           tags:
             - nixos
           stage: release
-          #image:
-          #  name: goreleaser/goreleaser
-          #  entrypoint: [""]
-          only:
-            - tags
+          rules:
+            - if: '$CI_COMMIT_MESSAGE =~ /RELEASE_IT/'
+              when: on_success
+            - when: never
           variables:
             # Disable shallow cloning so that goreleaser  can diff between tags to
             GIT_DEPTH: 0
@@ -321,11 +320,11 @@ in {
     
     sed -i "s/version\s*=\s*\".*\"/version=\"''${NEWVERSION}\"/" ${config.devenv.root}/project.nix
     ${pkgs.git}/bin/git add ${config.devenv.root}/project.nix
-    ${pkgs.git}/bin/git commit -m "chore: Bump version to ''${NEWVERSION} (NOT_TAGIT)"
+    ${pkgs.git}/bin/git commit -m "chore: Bump version to ''${NEWVERSION} (RELEASE_IT)"
     
     ${pkgs.git}/bin/git log --decorate=short --pretty=oneline
     
-    ${pkgs.git}/bin/git tag -a "''${NEWVERSION}" -m "chore: Release ''${NEWVERSION} (NOT_TAGIT)"
+    ${pkgs.git}/bin/git tag -a "''${NEWVERSION}" -m "chore: Release ''${NEWVERSION} (RELEASE_IT)"
     ${pkgs.git}/bin/git push origin $CI_COMMIT_REF_NAME --tags
 
   '';
-- 
GitLab