diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf943f9..aa1511f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,36 @@ env: INCLUDE_SYMBOLS: true jobs: + release-version: + if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v7 + with: + fetch-depth: 0 + + - name: Setup .NET + uses: actions/setup-dotnet@v6 + with: + dotnet-version: 10.0.x + + - name: Install GitVersion + uses: gittools/actions/gitversion/setup@v5 + with: + versionSpec: '7.0.x' + + - name: Run GitVersion + id: gitversion + uses: gittools/actions/gitversion/execute@v5 + + - name: Verify release version outputs + env: + PACKAGE_VERSION: ${{ steps.gitversion.outputs.semVer }} + ASSEMBLY_VERSION: ${{ steps.gitversion.outputs.assemblySemVer }} + FILE_VERSION: ${{ steps.gitversion.outputs.assemblySemFileVer }} + run: test -n "$PACKAGE_VERSION" && test -n "$ASSEMBLY_VERSION" && test -n "$FILE_VERSION" + pr-checks: if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest @@ -306,7 +336,7 @@ jobs: - name: Install GitVersion uses: gittools/actions/gitversion/setup@v5 with: - versionSpec: '6.x' + versionSpec: '7.0.x' - name: Run GitVersion id: gitversion diff --git a/GitVersion.yml b/GitVersion.yml index 607c2e9..885a839 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -1,11 +1,10 @@ workflow: GitHubFlow/v1 -tag-prefix: 'v' -commit-message-incrementing: Enabled - -major-version-bump-message: '(?m)^[a-z]+(?:\([\w\s\-,/\\]+\))?!:|(?m)^\s*BREAKING CHANGE:' -minor-version-bump-message: '(?m)^feat(?:\([\w\s\-,/\\]+\))?:' -patch-version-bump-message: '(?m)^(?:fix|perf)(?:\([\w\s\-,/\\]+\))?:' - -branches: - main: - mode: ContinuousDeployment +calculation: + tag-prefix: 'v' + commit-message-incrementing: Enabled + major-version-bump-message: '(?m)^[a-z]+(?:\([\w\s\-,/\\]+\))?!:|(?m)^\s*BREAKING CHANGE:' + minor-version-bump-message: '(?m)^feat(?:\([\w\s\-,/\\]+\))?:' + patch-version-bump-message: '(?m)^(?:fix|perf)(?:\([\w\s\-,/\\]+\))?:' + branches: + main: + mode: ContinuousDeployment