Skip to content

Commit

Permalink
.NET 8
Browse files Browse the repository at this point in the history
+semver:major
  • Loading branch information
johnkors committed Nov 15, 2023
1 parent d825e66 commit e028e51
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 26 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ jobs:
steps:
- uses: actions/checkout@v2
- 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
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/PreRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
- name: Setup .NET
uses: actions/setup-dotnet@v1
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
Expand Down
8 changes: 4 additions & 4 deletions samples/With/With.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.Worker">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/With/Worker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion samples/Without/Worker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
22 changes: 15 additions & 7 deletions source/MinimalHttpLogger/MinimalHttpLogger.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
Expand All @@ -17,14 +17,22 @@
</PropertyGroup>

<PropertyGroup>
<DotNet6Version>6.0.0</DotNet6Version>
<DotNet7Version>7.0.0</DotNet7Version>
<DotNet8Version>8.0.0</DotNet8Version>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.Extensions.Http" Version="$(DotNet6Version)" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="$(DotNet6Version)" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="$(DotNet6Version)" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="$(DotNet6Version)" />
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
<PackageReference Include="Microsoft.Extensions.Http" Version="$(DotNet7Version)" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="$(DotNet7Version)" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="$(DotNet7Version)" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="$(DotNet7Version)" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.Extensions.Http" Version="$(DotNet8Version)" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="$(DotNet8Version)" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="$(DotNet8Version)" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="$(DotNet8Version)" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit e028e51

Please sign in to comment.