From c2f1a50919fa0ba89b552284196dfdf633f84845 Mon Sep 17 00:00:00 2001 From: Frederik Carlier Date: Wed, 8 Jan 2025 19:38:39 +0100 Subject: [PATCH 1/2] Update target frameworks, NuGet dependencies This commit: - Updates the .NET versions which are being targetted to: * .NET 4.6.2 (.NET 4.5 has been out of support for a very long time) * net6.0 and net8.0, net5.0 and netstandard have been out of support for a very long time - Updates the various NuGet packages which are referenced to the latest version --- plist-cil.benchmark/plist-cil.benchmark.csproj | 6 +++--- plist-cil.test/plist-cil.test.csproj | 13 ++++++++----- plist-cil/plist-cil.csproj | 14 +++++++------- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/plist-cil.benchmark/plist-cil.benchmark.csproj b/plist-cil.benchmark/plist-cil.benchmark.csproj index 36cc1e8..de77459 100644 --- a/plist-cil.benchmark/plist-cil.benchmark.csproj +++ b/plist-cil.benchmark/plist-cil.benchmark.csproj @@ -1,13 +1,13 @@ - + Exe - net5.0 + net8.0 Claunia.PropertyList.Benchmark - + diff --git a/plist-cil.test/plist-cil.test.csproj b/plist-cil.test/plist-cil.test.csproj index 6f69214..5a42cf0 100644 --- a/plist-cil.test/plist-cil.test.csproj +++ b/plist-cil.test/plist-cil.test.csproj @@ -1,13 +1,16 @@ - + - net5.0 + net8.0 - - - + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/plist-cil/plist-cil.csproj b/plist-cil/plist-cil.csproj index 2ec3529..bbe0c38 100644 --- a/plist-cil/plist-cil.csproj +++ b/plist-cil/plist-cil.csproj @@ -1,7 +1,7 @@ - + - net45;netstandard2.0;netcoreapp2.1;netcoreapp3.1;net5.0 + net6.0;net8.0 2.2 Natalia Portillo Claunia.com @@ -31,7 +31,7 @@ Add .NET 5.0 support. - $(TargetFrameworks);net45 + $(TargetFrameworks);net462 @@ -42,16 +42,16 @@ Add .NET 5.0 support. TRACE;DEBUG - + $(DefineConstants);NATIVE_SPAN - + - - + + From 79418c6b1a66245c10e3cb0187073c54a4a01ee1 Mon Sep 17 00:00:00 2001 From: Frederik Carlier Date: Wed, 8 Jan 2025 19:42:02 +0100 Subject: [PATCH 2/2] Add GitHub CI --- .github/workflows/ci.yaml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..23caaa7 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,35 @@ +name: .NET + +on: + push: + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 8.0.x + - name: Build + run: dotnet build -c Release + - name: Test + run: dotnet test + - name: Create NuGet packages + run: | + dotnet pack -c Release -o nuget/ + - name: Publish NuGet packages as artifacts + uses: actions/upload-artifact@v3 + with: + name: plist-cil + path: nuget/ + - name: Publish NuGet packages to NuGet feed + run: | + dotnet nuget add source --username USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" + dotnet nuget push "nuget/*.nupkg" --api-key ${{ secrets.GITHUB_TOKEN }} --source "github" + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}