diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9832398..a5615e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,15 +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.0.x + versionSpec: 6.5.x - name: Determine Version id: version - uses: gittools/actions/gitversion/execute@v3.0.0 - with: - useConfigFile: true + uses: gittools/actions/gitversion/execute@v4.2.0 - name: Install dependencies run: dotnet restore @@ -88,18 +86,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..8fb539d 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -1,28 +1,31 @@ -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)[/-](?\d+) + increment: Patch # Default для коммитов без conventional prefix is-release-branch: false track-merge-target: true label: pr-{Number}