diff --git a/.azure/pipelines/azure-pipelines.yml b/.azure/pipelines/azure-pipelines.yml index 9576b5f..a55b15c 100644 --- a/.azure/pipelines/azure-pipelines.yml +++ b/.azure/pipelines/azure-pipelines.yml @@ -7,6 +7,7 @@ trigger: branches: include: - main + - "dev*" tags: include: - "*.*.*" @@ -31,6 +32,11 @@ pool: vmImage: $(imageName) steps: + - task: UseDotNet@2 + displayName: "Use .NET Core sdk 8.x" + inputs: + version: 8.x + - task: UseDotNet@2 displayName: "Use .NET Core sdk 7.x" inputs: @@ -40,12 +46,7 @@ steps: displayName: "Use .NET Core sdk 6.x" inputs: version: 6.x - - - task: UseDotNet@2 - displayName: "Use .NET Core sdk 3.1.x" - inputs: - version: 3.1.x - + - script: dotnet --info displayName: "dotnet info" diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml index 25bdc83..39e9465 100644 --- a/.github/workflows/dotnet-core.yml +++ b/.github/workflows/dotnet-core.yml @@ -2,7 +2,7 @@ name: .NET Core on: push: - branches: [main] + branches: ["main", "dev*"] tags: ["*.*.*"] pull_request: branches: [main] @@ -19,26 +19,34 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Setup .NET Core 7.0.x, 6.0.x and 3.1.x + + - name: Setup .NET Core 8.0.x, 7.0.x and 6.0.x uses: actions/setup-dotnet@v3 with: dotnet-version: | - 3.1.x 6.0.x 7.0.x + 8.0.x + - name: dotnet info run: dotnet --info + - name: Install dependencies run: dotnet restore --verbosity normal + - name: Build run: dotnet build --configuration Release --no-restore --verbosity normal + - name: Test run: dotnet test -c Release --no-build --verbosity normal + - name: Pack run: dotnet pack -c Release -o ./artifacts/packages/ --no-build --verbosity normal + - if: ${{ success() && runner.os == 'Windows' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) }} name: Push MyGet run: dotnet nuget push .\artifacts\packages\*.nupkg -s https://www.myget.org/F/netlah/api/v2/package -k ${{ secrets.MYGET }} + - if: ${{ success() && runner.os == 'Windows' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) }} name: Publish Nuget to GitHub registry run: dotnet nuget push .\artifacts\packages\*.nupkg -s https://nuget.pkg.github.com/NetLah/index.json --skip-duplicate -k ${{ secrets.PUSH_GITHUB_REGISTRY_TOKEN }} diff --git a/Common.props b/Common.props new file mode 100644 index 0000000..7d4ac43 --- /dev/null +++ b/Common.props @@ -0,0 +1,34 @@ + + + + 6.0.20;7.0.9;8.0.0-preview.6 + True + + $([MSBuild]::GetTargetFrameworkIdentifier($(TargetFramework))) + $([MSBuild]::GetTargetFrameworkVersion($(TargetFramework))) + + False + False + False + False + False + False + False + False + + True + True + True + True + True + True + True + + False + False + True + True + + + + diff --git a/Directory.Build.targets b/Directory.Build.targets index 939c227..a4f35b1 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,105 +1,149 @@ + + + + 6.* + 7.* + 8.*-* + + + + 7.* + 8.*-* + + - 6.0.16 - 3.1.* - 5.* - 6.* - 7.* - 8.*-* - 5.* - $(FrameworkVersion) - 5.* - 6.* + 5.* + $(FrameworkVersion) + + 5.* + 6.* + + + - - + - - - - - + + + + + - - - + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - + + - - + + + + + + + + + + + + - + + + + + + + + + + - + + + + + + + + + + + + - + + @@ -108,6 +152,7 @@ + @@ -115,54 +160,104 @@ + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + - - - - - + + + + + + + + + + + + - + + + + + + + + @@ -176,9 +271,12 @@ + + + @@ -188,17 +286,46 @@ + + + + + + + - + + + + + + + - - + + + + + + + + + + + + + + + + + + @@ -208,6 +335,7 @@ + @@ -232,11 +360,13 @@ - - + + + + 0 diff --git a/NetLah.Abstractions.Test/NetLah.Abstractions.Test.csproj b/NetLah.Abstractions.Test/NetLah.Abstractions.Test.csproj index 295f273..b636b25 100644 --- a/NetLah.Abstractions.Test/NetLah.Abstractions.Test.csproj +++ b/NetLah.Abstractions.Test/NetLah.Abstractions.Test.csproj @@ -1,7 +1,7 @@  - net7.0;net6.0;netcoreapp3.1 + net8.0;net7.0;net6.0 false true ../NetLah.snk diff --git a/NetLah.Abstractions/Directory.Build.targets b/NetLah.Abstractions/Directory.Build.targets new file mode 100644 index 0000000..0d55855 --- /dev/null +++ b/NetLah.Abstractions/Directory.Build.targets @@ -0,0 +1,3 @@ + + + diff --git a/NetLah.AssemblyInfo.BuildTime.Target/Directory.Build.targets b/NetLah.AssemblyInfo.BuildTime.Target/Directory.Build.targets new file mode 100644 index 0000000..0d55855 --- /dev/null +++ b/NetLah.AssemblyInfo.BuildTime.Target/Directory.Build.targets @@ -0,0 +1,3 @@ + + + diff --git a/README.md b/README.md index e2134ce..4669109 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ This solution come from the idea of [Gérald Barré on Meziantou's blog Getting ```xml - + ``` @@ -82,7 +82,7 @@ Version:0.2.0-rc2.2 BuildTime:2021-11-08T21:26:56+08:00; Framework:.NETCoreApp,V ```xml - + ``` @@ -91,6 +91,6 @@ Version:0.2.0-rc2.2 BuildTime:2021-11-08T21:26:56+08:00; Framework:.NETCoreApp,V ```xml - + ``` diff --git a/samples/SampleApp/SampleApp.csproj b/samples/SampleApp/SampleApp.csproj index 187a637..1b3570b 100644 --- a/samples/SampleApp/SampleApp.csproj +++ b/samples/SampleApp/SampleApp.csproj @@ -2,7 +2,7 @@ Exe - net7.0;net6.0;netcoreapp3.1 + net8.0;net7.0;net6.0 false