Skip to content

Commit

Permalink
.NET 8 support (#8)
Browse files Browse the repository at this point in the history
+semver:major
  • Loading branch information
johnkors authored Nov 15, 2023
1 parent 19c8668 commit 038f845
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 20 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore source
- name: Build
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/PreRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,18 @@ jobs:
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
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
dotnet-version: 8.0.x
- name: Pack
run: dotnet pack source -c Release /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
8 changes: 3 additions & 5 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,18 @@ jobs:
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
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
dotnet-version: 8.0.x
- name: Pack
run: dotnet pack source -c Release /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
2 changes: 1 addition & 1 deletion source/SomeClassLib.Tests/SomeClassLib.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net8.0;net7.0</TargetFrameworks>
<ImplicitUsing>enable</ImplicitUsing>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
Expand Down
12 changes: 6 additions & 6 deletions source/SomeClassLib/SomeClassLib.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

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

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

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

<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
Expand Down

0 comments on commit 038f845

Please sign in to comment.