From a32d2546d440a71fac8c6994f097382eb4141c47 Mon Sep 17 00:00:00 2001 From: Gregory Nickonov Date: Sat, 6 Dec 2025 22:56:05 +0300 Subject: [PATCH 1/4] chore: Switch to Continous Delivery mode and add conventional commits support --- .github/workflows/ci.yml | 32 ++++++++++++++++---------------- GitVersion.yml | 25 ++++++++++++++----------- 2 files changed, 30 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9832398..88bdd2c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,7 @@ jobs: - name: Install GitVersion uses: gittools/actions/gitversion/setup@v3.0.0 with: - versionSpec: 6.0.x + versionSpec: 6.5.x - name: Determine Version id: version @@ -88,18 +88,18 @@ jobs: run: dotnet nuget push "*.nupkg" -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json working-directory: artifacts - - name: Create GitHub Release - if: | - github.event_name == 'push' && - github.ref == 'refs/heads/main' && - steps.version.outputs.PreReleaseTag == '' && - !github.event.act - uses: softprops/action-gh-release@v2 - with: - tag_name: v${{ steps.version.outputs.FullSemVer }} - name: Release ${{ steps.version.outputs.FullSemVer }} - body: | - ## Changes in this release - ${{ steps.version.outputs.Changelog }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file +# - name: Create GitHub Release +# if: | +# github.event_name == 'push' && +# github.ref == 'refs/heads/main' && +# steps.version.outputs.PreReleaseTag == '' && +# !github.event.act +# uses: softprops/action-gh-release@v2 +# with: +# tag_name: v${{ steps.version.outputs.FullSemVer }} +# name: Release ${{ steps.version.outputs.FullSemVer }} +# body: | +# ## Changes in this release +# ${{ steps.version.outputs.Changelog }} +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/GitVersion.yml b/GitVersion.yml index 3345bb1..4ca2ec4 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -1,31 +1,34 @@ -mode: ContinuousDeployment -strategies: - - MergeMessage - - TaggedCommit - - Mainline - - Fallback +# Используем ContinuousDelivery режим +mode: ContinuousDelivery +# Включить версионирование на основе commit messages (conventional commits) commit-message-incrementing: Enabled +# Настройка распознавания conventional commits +major-version-bump-message: '\+semver:\s?(breaking|major)|^(feat|fix)!:|BREAKING\s+CHANGE:' +minor-version-bump-message: '\+semver:\s?(feature|minor)|^feat(\(.+\))?:' +patch-version-bump-message: '\+semver:\s?(fix|patch)|^fix(\(.+\))?:' +no-bump-message: '\+semver:\s?none' + branches: main: regex: ^main$ - increment: Patch + increment: Patch # Default для коммитов без conventional prefix is-release-branch: true feature: regex: ^feature[/-] - increment: Patch + increment: Patch # Default для коммитов без conventional prefix is-release-branch: false track-merge-target: true label: alpha pull-request: - regex: ^(pull|pull\-requests|pr)[\/-](?\d*) - increment: Inherit + regex: ^(pull|pull\-requests|pr)[/-] + increment: Patch # Default для коммитов без conventional prefix is-release-branch: false track-merge-target: true label: pr-{Number} ignore: - sha: [] \ No newline at end of file + sha: [] From 27eab34ca96ba4ba1b81eeb085c35caa21623aa3 Mon Sep 17 00:00:00 2001 From: Gregory Nickonov Date: Sat, 6 Dec 2025 23:47:07 +0300 Subject: [PATCH 2/4] Update GitVersion action --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 88bdd2c..3e4b19d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,13 +36,13 @@ jobs: run: dotnet --info - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v3.0.0 + uses: gittools/actions/gitversion/setup@v4.2.0 with: versionSpec: 6.5.x - name: Determine Version id: version - uses: gittools/actions/gitversion/execute@v3.0.0 + uses: gittools/actions/gitversion/execute@v4.2.0 with: useConfigFile: true From 70700f60b0f8340a9e3d5d48356c4459e62bcd11 Mon Sep 17 00:00:00 2001 From: Gregory Nickonov Date: Sat, 6 Dec 2025 23:50:16 +0300 Subject: [PATCH 3/4] Adjust GitVersion parameters --- .github/workflows/ci.yml | 2 -- GitVersion.yml | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e4b19d..a5615e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,8 +43,6 @@ jobs: - name: Determine Version id: version uses: gittools/actions/gitversion/execute@v4.2.0 - with: - useConfigFile: true - name: Install dependencies run: dotnet restore diff --git a/GitVersion.yml b/GitVersion.yml index 4ca2ec4..b373260 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -28,7 +28,7 @@ branches: increment: Patch # Default для коммитов без conventional prefix is-release-branch: false track-merge-target: true - label: pr-{Number} + label: pr ignore: - sha: [] + sha: [] \ No newline at end of file From ff4b1de4ce2f71f12a05bfc88166e11fbb28ff2b Mon Sep 17 00:00:00 2001 From: Gregory Nickonov Date: Sat, 6 Dec 2025 23:52:48 +0300 Subject: [PATCH 4/4] Adjust PR label --- GitVersion.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GitVersion.yml b/GitVersion.yml index b373260..8fb539d 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -24,11 +24,11 @@ branches: label: alpha pull-request: - regex: ^(pull|pull\-requests|pr)[/-] + regex: ^(pull|pull\-requests|pr)[/-](?\d+) increment: Patch # Default для коммитов без conventional prefix is-release-branch: false track-merge-target: true - label: pr + label: pr-{Number} ignore: sha: [] \ No newline at end of file