Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/gitversion.yml
Original file line number Diff line number Diff line change
@@ -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"
8 changes: 8 additions & 0 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -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)(\([^)]*\))?:'
Loading