From 5734e79306d77c8618ca6d0c785f50f592201ded Mon Sep 17 00:00:00 2001 From: Pavel Kuznetsov Date: Sat, 7 Nov 2026 09:19:17 +0200 Subject: [PATCH 1/2] chore: configure GitVersion semantic versioning --- GitVersion.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 GitVersion.yml diff --git a/GitVersion.yml b/GitVersion.yml new file mode 100644 index 0000000..54430ca --- /dev/null +++ b/GitVersion.yml @@ -0,0 +1,8 @@ +branches: + main: + increment: Patch + prevent-increment: + of-merged-branch: false +major-version-bump-message: '^(\w+)(\([^)]*\))?!:|BREAKING CHANGE:' +minor-version-bump-message: '^feat(\([^)]*\))?:' +patch-version-bump-message: '^(fix|perf)(\([^)]*\))?:' From 785d6b04e6b1480aa55036f787e20ffdd9c9bfdf Mon Sep 17 00:00:00 2001 From: Pavel Kuznetsov Date: Sat, 7 Nov 2026 09:19:48 +0200 Subject: [PATCH 2/2] ci: validate GitVersion SemVer --- .github/workflows/gitversion.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/gitversion.yml diff --git a/.github/workflows/gitversion.yml b/.github/workflows/gitversion.yml new file mode 100644 index 0000000..a081b63 --- /dev/null +++ b/.github/workflows/gitversion.yml @@ -0,0 +1,31 @@ +name: GitVersion validation + +on: + push: + branches: [main] + pull_request: + workflow_dispatch: + +permissions: + contents: read + +jobs: + version: + name: Calculate semantic version + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + fetch-depth: 0 + persist-credentials: false + - name: Install GitVersion + run: dotnet tool install GitVersion.Tool --tool-path "$RUNNER_TEMP/gitversion" --version 6.8.2 + - name: Calculate and validate version + shell: bash + run: | + set -euo pipefail + version="$("$RUNNER_TEMP/gitversion/dotnet-gitversion" /showvariable SemVer)" + test -n "$version" + echo "Calculated GitVersion SemVer: $version" + echo "### GitVersion: $version" >> "$GITHUB_STEP_SUMMARY"