From 23324cfe7d89fe8b15fa614c1172442e653af249 Mon Sep 17 00:00:00 2001 From: ronnie Date: Mon, 6 Apr 2026 11:51:34 -0400 Subject: [PATCH] auto icrment --- .gitea/workflows/test.yml | 22 ++++++++++++++++++---- GitVersion.yml | 9 +++++++++ 2 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 GitVersion.yml diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index b1ff382..d6a84f3 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -16,22 +16,36 @@ jobs: uses: actions/setup-dotnet@v4 with: dotnet-version: 10.0.x + fetch-depth: 0 - name: Restore run: dotnet restore + - name: Install GitVersion + uses: gittools/actions/gitversion/setup@v0 + with: + versionSpec: '5.x' + + - name: Determine Version + id: gitversion + uses: gittools/actions/gitversion/execute@v0 + - name: Build run: dotnet build -c Release - name: Pack - run: dotnet pack -c Release -o ./packages + run: | + dotnet pack \ + -p:PackageVersion=${{ steps.gitversion.outputs.semVer }} \ + -c Release - name: Publish run: | - dotnet nuget push ./packages/*.nupkg \ - --source http://192.168.1.4:3000/api/packages/Ronnie/nuget/index.json \ + dotnet nuget push ./bin/Release/*.nupkg \ + --source "http://192.168.1.4:3000/api/packages/Ronnie/nuget/index.json" \ + --api-key "${{ secrets.NUGET_KEY }}" \ + --skip-duplicate --allow-insecure-connections true \ - --api-key ${{ secrets.NUGET_KEY }} # name: Gitea Actions Demo # run-name: ${{ gitea.actor }} is testing out Gitea Actions diff --git a/GitVersion.yml b/GitVersion.yml new file mode 100644 index 0000000..4cd6734 --- /dev/null +++ b/GitVersion.yml @@ -0,0 +1,9 @@ +mode: ContinuousDelivery + +branches: + main: + increment: Patch + feature: + increment: Minor + hotfix: + increment: Patch \ No newline at end of file