From ba00a1a7315689c53f761a0815866dc907a315a1 Mon Sep 17 00:00:00 2001 From: Mehdi Hadeli Date: Wed, 21 Aug 2024 23:53:29 +0330 Subject: [PATCH] build: :green_heart: some change for generate version in the build --- .github/workflows/ci-cd.yml | 4 ++-- Directory.Build.props | 7 ++---- Vertical.Slice.Template.sln | 2 ++ src/Directory.Packages.props | 2 +- .../Vertical.Slice.Template.Shared.csproj | 7 ------ tests/Directory.Build.props | 18 +++++++-------- ...Vertical.Slice.Template.TestsShared.csproj | 12 ---------- version.json | 2 +- ...e.csproj => vertical-slice-template.csproj | 22 ++++++++++--------- 9 files changed, 29 insertions(+), 47 deletions(-) rename Template.csproj => vertical-slice-template.csproj (78%) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 4d5adaa..cc9011f 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -84,11 +84,11 @@ jobs: run: dotnet restore Vertical.Slice.Template.sln - name: Build Version ${{ steps.nbgv.outputs.nugetpackageversion }} - run: dotnet build Vertical.Slice.Template.sln -c Release --no-restore /p:Version=${{ steps.nbgv.outputs.AssemblyVersion }} + run: dotnet build Vertical.Slice.Template.sln -c Release --no-restore /p:Version=${{ steps.nbgv.outputs.SemVer2 }} # https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-pack - name: Pack NuGet Package Version ${{ steps.nbgv.outputs.nugetpackageversion }} - run: dotnet pack Vertical.Slice.Template.sln --no-build --no-restore -c Release --output ${{ env.NuGetDirectory }} + run: dotnet pack vertical-slice-template.csproj -c Release -o ${{ env.NuGetDirectory }} # Publish the NuGet package as an artifact, so they can be used in the following jobs - uses: actions/upload-artifact@v3 diff --git a/Directory.Build.props b/Directory.Build.props index 78f8c27..1e80a4a 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,9 +1,6 @@  - - all - 1.2.0 - + - \ No newline at end of file + diff --git a/Vertical.Slice.Template.sln b/Vertical.Slice.Template.sln index 8937f7c..8050465 100644 --- a/Vertical.Slice.Template.sln +++ b/Vertical.Slice.Template.sln @@ -39,6 +39,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "solution-items", "solution- package.json = package.json readme.md = readme.md version.json = version.json + vertical-slice-template.csproj = vertical-slice-template.csproj + Directory.Build.props = Directory.Build.props EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".config", ".config", "{154A55C1-CE45-463D-B411-816C702D6A25}" diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 5cf88ae..d88d9d2 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -206,4 +206,4 @@ - \ No newline at end of file + diff --git a/src/Vertical.Slice.Template.Shared/Vertical.Slice.Template.Shared.csproj b/src/Vertical.Slice.Template.Shared/Vertical.Slice.Template.Shared.csproj index 10d4f67..b0cc06d 100644 --- a/src/Vertical.Slice.Template.Shared/Vertical.Slice.Template.Shared.csproj +++ b/src/Vertical.Slice.Template.Shared/Vertical.Slice.Template.Shared.csproj @@ -6,13 +6,6 @@ - - enable - enable - Vertical.Slice.Template.Shared - Vertical.Slice.Template.Shared - - diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props index 0d14836..ba9729d 100644 --- a/tests/Directory.Build.props +++ b/tests/Directory.Build.props @@ -2,16 +2,16 @@ - net8.0 - latest - enable - enable - CS1587,CS1591,CS1998,NU5105 + net8.0 + latest + enable + enable + CS1587,CS1591,CS1998,NU5105 - - - - + + + + diff --git a/tests/Vertical.Slice.Template.TestsShared/Vertical.Slice.Template.TestsShared.csproj b/tests/Vertical.Slice.Template.TestsShared/Vertical.Slice.Template.TestsShared.csproj index 46a89bc..e6a24cc 100644 --- a/tests/Vertical.Slice.Template.TestsShared/Vertical.Slice.Template.TestsShared.csproj +++ b/tests/Vertical.Slice.Template.TestsShared/Vertical.Slice.Template.TestsShared.csproj @@ -1,10 +1,5 @@ - - Vertical.Slice.Template.TestsShared - Vertical.Slice.Template.TestsShared - - @@ -45,11 +40,4 @@ - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - diff --git a/version.json b/version.json index 943412a..a40a478 100644 --- a/version.json +++ b/version.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/main/src/NerdBank.GitVersioning/version.schema.json", - "version": "1.2.0", + "version": "1.2.1", "publicReleaseRefSpec": ["^refs/heads/release/v\\d+(?:\\.\\d+)?$"], "release": { "branchName": "release/v{version}", diff --git a/Template.csproj b/vertical-slice-template.csproj similarity index 78% rename from Template.csproj rename to vertical-slice-template.csproj index 68d17cf..76b28f5 100644 --- a/Template.csproj +++ b/vertical-slice-template.csproj @@ -16,7 +16,6 @@ Mehdi Hadeli An asp.net core template based on Vertical Slice Architecture, CQRS, Minimal APIs, API Versioning and Swagger. dotnet;dotnet-core;templates;csharp;vertical-slices;vertical-slices-architecture;clean-architecture;cqrs;minimal-api - netstandard2.0 true false content @@ -28,19 +27,22 @@ main true icon.png - true + true + + + + net8.0 - - - + + - - - + + + - - \ No newline at end of file + +