From af53afbaf3b4a8e29ffc311d5fbd8c2a8f2dfb15 Mon Sep 17 00:00:00 2001 From: Jan Trejbal Date: Wed, 18 Dec 2024 23:33:15 +0100 Subject: [PATCH] Update GitVersion.yml (#171) --- .github/workflows/nightly-release.yml | 12 ++++++------ .github/workflows/release.yml | 13 +++++++------ GitVersion.yml | 8 ++++++-- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/.github/workflows/nightly-release.yml b/.github/workflows/nightly-release.yml index 7e1c9e0..c1c9e32 100644 --- a/.github/workflows/nightly-release.yml +++ b/.github/workflows/nightly-release.yml @@ -23,23 +23,23 @@ jobs: - name: Install GitVersion uses: gittools/actions/gitversion/setup@v3.1.1 with: - versionSpec: '5.x' + versionSpec: '6.0.5' - name: Use GitVersion id: gitversion # step id used as reference for output values uses: gittools/actions/gitversion/execute@v3.1.1 - run: | echo "MajorMinorPatch: ${{ steps.gitversion.outputs.MajorMinorPatch }}" - echo "NuGetVersionV2: ${{ steps.gitversion.outputs.nuGetVersionV2 }}" - echo "CommitsSinceVersionSourcePadded: ${{ steps.gitversion.outputs.CommitsSinceVersionSourcePadded }}" + echo "FullSemVer: ${{ steps.gitversion.outputs.FullSemVer }}" + echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }}" - name: Restore with .Net run: dotnet restore --nologo src - name: Build with .Net - run: dotnet build --configuration Release --no-restore --nologo "-p:Version=${{ steps.gitversion.outputs.NuGetVersionV2 }}" src + run: dotnet build --configuration Release --no-restore --nologo "-p:Version=${{ steps.gitversion.outputs.FullSemVer }}" src - name: Pack with .Net - run: dotnet pack --nologo --no-build --configuration Release --output nuget-packages -p:PackageVersion=${{ steps.gitversion.outputs.NuGetVersionV2 }} src/Daktela.HttpClient/Daktela.HttpClient.csproj + run: dotnet pack --nologo --no-build --configuration Release --output nuget-packages -p:PackageVersion=${{ steps.gitversion.outputs.FullSemVer }} src/Daktela.HttpClient/Daktela.HttpClient.csproj - uses: actions/upload-artifact@v4 with: - name: Nuget-packages-${{ steps.gitversion.outputs.NuGetVersionV2 }} + name: Nuget-packages-${{ steps.gitversion.outputs.FullSemVer }} path: nuget-packages - name: Push package to Myget if: ${{ vars.USE_MYGET == 'true' }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ce580c2..fbdca6e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,22 +22,23 @@ jobs: - name: Install GitVersion uses: gittools/actions/gitversion/setup@v3.1.1 with: - versionSpec: '5.x' + versionSpec: '6.0.5' - name: Use GitVersion id: gitversion # step id used as reference for output values uses: gittools/actions/gitversion/execute@v3.1.1 - run: | - echo "NuGetVersionV2: ${{ steps.gitversion.outputs.nuGetVersionV2 }}" - echo "NuGetPreReleaseTagV2 (not used): ${{ steps.gitversion.outputs.CommitsSinceVersionSourcePadded }}" + echo "MajorMinorPatch: ${{ steps.gitversion.outputs.MajorMinorPatch }}" + echo "FullSemVer: ${{ steps.gitversion.outputs.FullSemVer }}" + echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.CommitsSinceVersionSource }}" - name: Restore with .Net run: dotnet restore --nologo src - name: Build with .Net - run: dotnet build --configuration Release --no-restore --nologo "-p:Version=${{ steps.gitversion.outputs.MajorMinorPatch }}" src + run: dotnet build --configuration Release --no-restore --nologo "-p:Version=${{ steps.gitversion.outputs.FullSemVer }}" src - name: Pack with .Net - run: dotnet pack --nologo --no-build --configuration Release --output nuget-packages -p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }} src/Daktela.HttpClient/Daktela.HttpClient.csproj + run: dotnet pack --nologo --no-build --configuration Release --output nuget-packages -p:PackageVersion=${{ steps.gitversion.outputs.FullSemVer }} src/Daktela.HttpClient/Daktela.HttpClient.csproj - uses: actions/upload-artifact@v4 with: - name: Nuget-packages-${{ steps.gitversion.outputs.nuGetVersionV2 }} + name: Nuget-packages-${{ steps.gitversion.outputs.FullSemVer }} path: nuget-packages - name: Configure Github Nuget Feed run: dotnet nuget add source --name github https://nuget.pkg.github.com/aviationexam/index.json diff --git a/GitVersion.yml b/GitVersion.yml index 6fe77d8..9532199 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -1,5 +1,9 @@ -mode: ContinuousDeployment -continuous-delivery-fallback-tag: nightly +mode: ContinuousDelivery +branches: + main: + increment: Patch + label: nightly + source-branches: [main] ignore: sha: [] merge-message-formats: {}