From 9475c424b6530ebf750bfa4e3f235b8315990d5c Mon Sep 17 00:00:00 2001
From: "Benguria Elguezabal, Gorka" <gorka.benguria@tecnalia.com>
Date: Thu, 29 Aug 2024 10:02:32 +0000
Subject: [PATCH] changes for semantic version to start with v

---
 .gitlab-ci.yml  | 1 +
 .releaserc.yaml | 9 +++++----
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 783fd31..f9e7acb 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -32,6 +32,7 @@ include:
       release-disabled: false
       semantic-release-job-tags: ["docker"]
       branches-ref: "/^(master|main)$/"
+      tag-format: "$$v{version}"
   # sonar template
   - component: "$CI_SERVER_FQDN/$TBC_NAMESPACE/sonar/gitlab-ci-sonar@master"
     inputs:
diff --git a/.releaserc.yaml b/.releaserc.yaml
index 6b580d4..112b817 100644
--- a/.releaserc.yaml
+++ b/.releaserc.yaml
@@ -11,15 +11,16 @@ plugins:
   - - semantic-release-replace-plugin
     - replacements:
         - files:
-            - cmd/config.yaml
+            - main.go
           from:
-            - 'version: *\d+\.\d+\.\d+'
-          to: 'version: ${nextRelease.version}'
+            - 'version     = "v\d+\.\d+\.\d+-dev"'
+          to: 'version     = "${nextRelease.version}-dev"'
           countMatches: true
   # git commit/push modified files (CHANGELOG.md & pyproject.toml)
   - - '@semantic-release/git'
     - assets:
-        - cmd/config.yaml
+        - main.go
+        - '*.md'
       # the commit MUST trigger a pipeline on tag (to perform publish jobs)
       # can be skipped on prod branch
       message: 'chore(semantic-release): release ${nextRelease.version} - [ci skip on prod]'
-- 
GitLab