trying an nonGitVersion

This commit is contained in:
2026-04-08 22:49:04 -04:00
parent 71173053df
commit 78db1311b2
2 changed files with 13 additions and 17 deletions

View File

@@ -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