From 93d70f7dfdf9e39d9f52076c2df9b98ee5127d01 Mon Sep 17 00:00:00 2001 From: John Korsnes Date: Wed, 15 Nov 2023 23:34:04 +0100 Subject: [PATCH] .NET 8 (#6) * .NET 8 * Update build scripts +semver:major --- .github/workflows/CI.yml | 6 ++--- .github/workflows/PreRelease.yml | 12 +++++----- .github/workflows/Release.yml | 12 +++++----- samples/With/With.csproj | 8 +++---- samples/With/Worker.cs | 2 +- samples/Without/Worker.cs | 2 +- .../MinimalHttpLogger.csproj | 22 +++++++++++++------ 7 files changed, 36 insertions(+), 28 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index cc84abe..6b32f82 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -7,11 +7,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup .NET - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v3 with: - dotnet-version: 6.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore source - name: Build diff --git a/.github/workflows/PreRelease.yml b/.github/workflows/PreRelease.yml index b6765ab..1bb8545 100644 --- a/.github/workflows/PreRelease.yml +++ b/.github/workflows/PreRelease.yml @@ -8,23 +8,23 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 - run: echo "ACTIONS_ALLOW_UNSECURE_COMMANDS=true" >> $GITHUB_ENV - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v0.9.10 + uses: gittools/actions/gitversion/setup@v0 with: versionSpec: "5.x" - name: Determine Version id: gitversion - uses: gittools/actions/gitversion/execute@v0.9.10 + uses: gittools/actions/gitversion/execute@v0 with: useConfigFile: true - - name: Setup .NET 6 - uses: actions/setup-dotnet@v1 + - name: Setup .NET + uses: actions/setup-dotnet@v3 with: - dotnet-version: 6.0.x + dotnet-version: 8.0.x - name: Pack run: dotnet pack source /p:Version=${{ steps.gitversion.outputs.NuGetVersionV2 }}-${{ steps.gitversion.outputs.ShortSha }} /p:InformationalVersion=${{ steps.gitversion.outputs.informationalVersion }} /p:PackageReleaseNotes="https://github.com/$GITHUB_REPOSITORY/releases/tag/${{ steps.gitversion.outputs.NuGetVersionV2 }}" -o ./releases - name: Publish diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index ae821d2..6e5badb 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -8,23 +8,23 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 - run: echo "ACTIONS_ALLOW_UNSECURE_COMMANDS=true" >> $GITHUB_ENV - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v0.9.10 + uses: gittools/actions/gitversion/setup@v0 with: versionSpec: "5.x" - name: Determine Version id: gitversion - uses: gittools/actions/gitversion/execute@v0.9.10 + uses: gittools/actions/gitversion/execute@v0 with: useConfigFile: true - - name: Setup .NET 6 - uses: actions/setup-dotnet@v1 + - name: Setup .NET + uses: actions/setup-dotnet@v3 with: - dotnet-version: 6.0.x + dotnet-version: 8.0.x - name: Pack run: dotnet pack source /p:Version=${{ steps.gitversion.outputs.majorMinorPatch }} /p:InformationalVersion=${{ steps.gitversion.outputs.informationalVersion }} /p:PackageReleaseNotes="https://github.com/$GITHUB_REPOSITORY/releases/tag/${{ steps.gitversion.outputs.majorMinorPatch }}" -o ./releases - name: Publish diff --git a/samples/With/With.csproj b/samples/With/With.csproj index 7a57bb2..249348e 100644 --- a/samples/With/With.csproj +++ b/samples/With/With.csproj @@ -1,14 +1,14 @@ - net6.0 + net8.0 enable - - - + + + diff --git a/samples/With/Worker.cs b/samples/With/Worker.cs index ade08c3..8a83971 100644 --- a/samples/With/Worker.cs +++ b/samples/With/Worker.cs @@ -18,7 +18,7 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken) { try { - await _client.GetAsync("https://httpstat.us/200?sleep=3000", stoppingToken); + await _client.GetAsync("https://google.com/?with-minimal-logging=true", stoppingToken); } catch (TaskCanceledException) { diff --git a/samples/Without/Worker.cs b/samples/Without/Worker.cs index 02d0b92..470942e 100644 --- a/samples/Without/Worker.cs +++ b/samples/Without/Worker.cs @@ -18,7 +18,7 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken) { try { - await _client.GetAsync("https://httpstat.us/404?sleep=3000", stoppingToken); + await _client.GetAsync("https://google.com/?with-minimal-logging=false", stoppingToken); } catch (TaskCanceledException) { diff --git a/source/MinimalHttpLogger/MinimalHttpLogger.csproj b/source/MinimalHttpLogger/MinimalHttpLogger.csproj index 14edb9a..eb0877a 100644 --- a/source/MinimalHttpLogger/MinimalHttpLogger.csproj +++ b/source/MinimalHttpLogger/MinimalHttpLogger.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0;net8.0 enable latest enable @@ -17,14 +17,22 @@ - 6.0.0 + 7.0.0 + 8.0.0 - - - - - + + + + + + + + + + + +