trying an nonGitVersion
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
mode: ContinuousDelivery
|
||||
|
||||
branches:
|
||||
master:
|
||||
increment: Patch
|
||||
feature:
|
||||
increment: Minor
|
||||
hotfix:
|
||||
increment: Patch
|
||||
Reference in New Issue
Block a user