From 900c4eef7cb7f3589f259610863c3b8f18dd2a7a Mon Sep 17 00:00:00 2001 From: Daniel Hindrikes Date: Fri, 15 Nov 2024 13:57:52 +0100 Subject: [PATCH] .net 9 support --- .github/workflows/PR.yml | 42 +++++++++-------- .github/workflows/release.yml | 47 ++++++++++--------- .../TinyInsights.TestApp.csproj | 10 ++-- TinyInsights.Web/TinyInsights.Web.csproj | 12 ++--- .../TinyInsights.WebServer.csproj | 4 +- TinyInsights/TinyInsights.csproj | 18 +++++-- 6 files changed, 75 insertions(+), 58 deletions(-) diff --git a/.github/workflows/PR.yml b/.github/workflows/PR.yml index 3ebaec3..0e0a05a 100644 --- a/.github/workflows/PR.yml +++ b/.github/workflows/PR.yml @@ -2,28 +2,32 @@ name: PR on: pull_request: - branches: [ "main" ] + branches: ["main"] jobs: build: - runs-on: windows-latest steps: - - uses: actions/checkout@v4 - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 8.0.x - - - name: Install Maui - run: dotnet workload install maui - - - name: Restore dependencies - run: dotnet restore TinyInsights/TinyInsights.csproj - - - name: Build - run: dotnet build TinyInsights/TinyInsights.csproj --no-restore - - - name: Pack - run: dotnet pack TinyInsights/TinyInsights.csproj \ No newline at end of file + - uses: actions/checkout@v4 + - name: Setup .NET 8.0 + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + + - name: Setup .NET 9.0 + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 9.0.x + + - name: Install Maui + run: dotnet workload install maui + + - name: Restore dependencies + run: dotnet restore TinyInsights/TinyInsights.csproj + + - name: Build + run: dotnet build TinyInsights/TinyInsights.csproj --no-restore + + - name: Pack + run: dotnet pack TinyInsights/TinyInsights.csproj diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5323779..03aac57 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,27 +6,32 @@ on: jobs: build: - runs-on: windows-latest steps: - - uses: actions/checkout@v4 - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 8.0.x - - - name: Install Maui - run: dotnet workload install maui - - - name: Restore dependencies - run: dotnet restore TinyInsights/TinyInsights.csproj - - - name: Build - run: dotnet build TinyInsights/TinyInsights.csproj --no-restore - - - name: Pack - run: dotnet pack TinyInsights/TinyInsights.csproj -p:PackageVersion=${{ github.ref_name }} - - - name: Push - run: dotnet nuget push '**/*.nupkg' --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json + - uses: actions/checkout@v4 + + - name: Setup .NET 8.0 + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + + - name: Setup .NET 9.0 + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 9.0.x + + - name: Install Maui + run: dotnet workload install maui + + - name: Restore dependencies + run: dotnet restore TinyInsights/TinyInsights.csproj + + - name: Build + run: dotnet build TinyInsights/TinyInsights.csproj --no-restore + + - name: Pack + run: dotnet pack TinyInsights/TinyInsights.csproj -p:PackageVersion=${{ github.ref_name }} + + - name: Push + run: dotnet nuget push '**/*.nupkg' --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json diff --git a/TinyInsights.TestApp/TinyInsights.TestApp.csproj b/TinyInsights.TestApp/TinyInsights.TestApp.csproj index 3521bfb..e922ce6 100644 --- a/TinyInsights.TestApp/TinyInsights.TestApp.csproj +++ b/TinyInsights.TestApp/TinyInsights.TestApp.csproj @@ -1,8 +1,8 @@  - net8.0-android;net8.0-ios;net8.0-maccatalyst - $(TargetFrameworks);net8.0-windows10.0.19041.0 + net9.0-android;net9.0-ios;net9.0-maccatalyst + $(TargetFrameworks);net9.0-windows10.0.19041.0 @@ -59,9 +59,9 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/TinyInsights.Web/TinyInsights.Web.csproj b/TinyInsights.Web/TinyInsights.Web.csproj index eb4c8c0..2780b56 100644 --- a/TinyInsights.Web/TinyInsights.Web.csproj +++ b/TinyInsights.Web/TinyInsights.Web.csproj @@ -1,17 +1,17 @@ - net8.0 + net9.0 enable enable - - - - - + + + + + diff --git a/TinyInsights.WebServer/TinyInsights.WebServer.csproj b/TinyInsights.WebServer/TinyInsights.WebServer.csproj index 6b63dde..6544204 100644 --- a/TinyInsights.WebServer/TinyInsights.WebServer.csproj +++ b/TinyInsights.WebServer/TinyInsights.WebServer.csproj @@ -1,7 +1,7 @@ - net8.0 + net9.0 enable enable @@ -15,7 +15,7 @@ - + diff --git a/TinyInsights/TinyInsights.csproj b/TinyInsights/TinyInsights.csproj index 569a435..3c8ca35 100644 --- a/TinyInsights/TinyInsights.csproj +++ b/TinyInsights/TinyInsights.csproj @@ -1,8 +1,8 @@ - + - net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst - $(TargetFrameworks);net8.0-windows10.0.19041.0 + net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst;net9.0;net9.0-android;net9.0-ios;net9.0-maccatalyst; + $(TargetFrameworks);net8.0-windows10.0.19041.0;net9.0-windows10.0.19041.0 true true enable @@ -27,9 +27,17 @@ - - + + + + + + + + + +