trying not gitversion
This commit is contained in:
@@ -21,23 +21,28 @@ jobs:
|
|||||||
|
|
||||||
- name: Restore
|
- name: Restore
|
||||||
run: dotnet 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
|
BASE=${TAG#v}
|
||||||
uses: gittools/actions/gitversion/setup@v0
|
|
||||||
with:
|
|
||||||
versionSpec: '5.x'
|
|
||||||
|
|
||||||
- name: Determine Version
|
IFS='.' read MAJOR MINOR PATCH <<< "$BASE"
|
||||||
id: gitversion
|
|
||||||
uses: gittools/actions/gitversion/execute@v0
|
|
||||||
|
|
||||||
|
NEW_PATCH=$((PATCH + COMMITS))
|
||||||
|
|
||||||
|
VERSION="$MAJOR.$MINOR.$NEW_PATCH"
|
||||||
|
|
||||||
|
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
|
||||||
- name: Build
|
- name: Build
|
||||||
run: dotnet build -c Release
|
run: dotnet build -c Release
|
||||||
|
|
||||||
- name: Pack
|
- name: Pack
|
||||||
run: |
|
run: |
|
||||||
dotnet pack \
|
dotnet pack \
|
||||||
-p:PackageVersion=${{ steps.gitversion.outputs.semVer }} \
|
-p:PackageVersion=${{ steps.version.outputs.VERSION }} \
|
||||||
-c Release
|
-c Release
|
||||||
|
|
||||||
- name: Publish
|
- name: Publish
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
mode: ContinuousDeployment
|
|
||||||
|
|
||||||
tag-prefix: '[vV]'
|
|
||||||
|
|
||||||
increment: Patch
|
|
||||||
|
|
||||||
branches:
|
|
||||||
master:
|
|
||||||
label: ''
|
|
||||||
increment: Patch
|
|
||||||
prevent-increment-of-merged-branch-version: true
|
|
||||||
|
|
||||||
feature:
|
|
||||||
label: preview
|
|
||||||
increment: Minor
|
|
||||||
|
|
||||||
hotfix:
|
|
||||||
label: ''
|
|
||||||
increment: Patch
|
|
||||||
|
|
||||||
pull-request:
|
|
||||||
label: pr
|
|
||||||
Reference in New Issue
Block a user