From 4c0c8913761b4722ecb056b70d8ecb82cb8179fd Mon Sep 17 00:00:00 2001 From: CodeByMrFinchum Date: Tue, 21 Jan 2025 19:37:57 +0100 Subject: [PATCH] finalazing pipline --- .gitlab-ci.yml | 10 +++++++--- Gitversion.yml | 4 +++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3f10601..1aef2d9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,19 +12,21 @@ gitversion: stage: .pre tags: - gitlab-org-docker -# rules: -# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run this job when commits are pushed or merged to the default branch + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run this job when commits are pushed or merged to the default branch build: stage: build image: python:3.9.21 tags: - gitlab-org-docker + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run this job when commits are pushed or merged to the default branch needs: - job: gitversion artifacts: true script: - - sed -i "s/0.0.1/${GitVersion_MajorMinorPatch}a${GitVersion_BuildMetaData}/" src/optima35/__init__.py + - sed -i "s/0.0.1/${GitVersion_MajorMinorPatch}" src/optima35/__init__.py - cat src/optima35/__init__.py - python3 -m pip install build - python3 -m build @@ -38,6 +40,8 @@ publish: image: python:3.9.21 tags: - gitlab-org-docker + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run this job when commits are pushed or merged to the default branch variables: TWINE_USERNAME: "__token__" TWINE_PASSWORD: $TWINE_API diff --git a/Gitversion.yml b/Gitversion.yml index 165f995..907c4c5 100644 --- a/Gitversion.yml +++ b/Gitversion.yml @@ -1,3 +1,5 @@ --- - mode: Mainline +major-version-bump-message: "^(build|chore|ci|docs|feat|fix|patch|refactor|revert|style|test)(\\([\\w\\s-,/\\\\]*\\))?(!:|:.*\\n\\n((.+\\n)+\\n)?BREAKING CHANGE:\\s.+)" # noqa yaml[line-length] +minor-version-bump-message: "^(build|chore|ci|docs|feat|refactor|revert|style|test)(\\([\\w\\s-,/\\\\]*\\))?:" +patch-version-bump-message: "^(fix|patch)(\\([\\w\\s-,/\\\\]*\\))?:"