From 78db1311b236d7afb5c9ba6f3cde5c2a65dacd6a Mon Sep 17 00:00:00 2001 From: ronnie Date: Wed, 8 Apr 2026 22:49:04 -0400 Subject: [PATCH] trying an nonGitVersion --- .gitea/workflows/test.yml | 21 +++++++++++++-------- GitVersion.yml | 9 --------- 2 files changed, 13 insertions(+), 17 deletions(-) delete mode 100644 GitVersion.yml diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index ca5207c..b5382a7 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -21,23 +21,28 @@ jobs: - name: Restore run: dotnet restore + - name: Calculate Version + id: version + run: | + TAG=$(git describe --tags --abbrev=0) + COMMITS=$(git rev-list $TAG..HEAD --count) - - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v0 - with: - versionSpec: '5.x' + BASE=${TAG#v} - - name: Determine Version - id: gitversion - uses: gittools/actions/gitversion/execute@v0 + IFS='.' read MAJOR MINOR PATCH <<< "$BASE" + NEW_PATCH=$((PATCH + COMMITS)) + + VERSION="$MAJOR.$MINOR.$NEW_PATCH" + + echo "VERSION=$VERSION" >> $GITHUB_OUTPUT - name: Build run: dotnet build -c Release - name: Pack run: | dotnet pack \ - -p:PackageVersion=${{ steps.gitversion.outputs.semVer }} \ + -p:PackageVersion=${{ steps.version.outputs.VERSION }} \ -c Release - name: Publish diff --git a/GitVersion.yml b/GitVersion.yml deleted file mode 100644 index c1cf715..0000000 --- a/GitVersion.yml +++ /dev/null @@ -1,9 +0,0 @@ -mode: ContinuousDelivery - -branches: - master: - increment: Patch - feature: - increment: Minor - hotfix: - increment: Patch \ No newline at end of file