Skip to content

Commit

Permalink
Add .net 8 target (#23)
Browse files Browse the repository at this point in the history
* Add .Net8 SDK

* Use .Net8 target

* Code style
  • Loading branch information
trejjam authored Nov 15, 2023
1 parent b4e2371 commit 60e0f34
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 21 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ jobs:
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 'true'
steps:
- name: Setup .Net 7.0.x
- name: Setup .Net
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
dotnet-version: |
7.0.x
8.0.x
- uses: actions/checkout@v4
- name: Restore
run: dotnet restore --nologo
Expand All @@ -32,10 +34,10 @@ jobs:
DOTNET_CLI_TELEMETRY_OPTOUT: 'true'
steps:
- uses: actions/checkout@v4
- name: Setup .Net 7.0.x
- name: Setup .Net 8.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
dotnet-version: '8.0.x'
- name: Restore
run: dotnet restore --nologo
- name: .Net Format
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/nightly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ jobs:
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 'true'
steps:
- name: Setup .Net 7.0.x
- name: Setup .Net
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
dotnet-version: |
7.0.x
8.0.x
- uses: actions/checkout@v4
- name: Fetch all history for all tags and branches
run: git fetch --prune --unshallow
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ jobs:
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 'true'
steps:
- name: Setup .Net 7.0.x
- name: Setup .Net
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
dotnet-version: |
7.0.x
8.0.x
- uses: actions/checkout@v4
- name: Restore
run: dotnet restore --nologo
Expand All @@ -35,10 +37,10 @@ jobs:
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Setup .Net 7.0.x
- name: Setup .Net 8.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
dotnet-version: '8.0.x'
- name: Restore
run: dotnet restore --nologo
- name: Add .Net Format Problem Matcher
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ jobs:
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 'true'
steps:
- name: Setup .Net 7.0.x
- name: Setup .Net
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
dotnet-version: |
7.0.x
8.0.x
- uses: actions/checkout@v4
- name: Fetch all history for all tags and branches
run: git fetch --prune --unshallow
Expand Down
6 changes: 3 additions & 3 deletions src/ReportingApi.Tests/ReportingApi.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<LangVersion>11.0</LangVersion>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<LangVersion>12.0</LangVersion>
<Nullable>enable</Nullable>
<PackageLicense>MIT</PackageLicense>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\ReportingApi\ReportingApi.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
4 changes: 1 addition & 3 deletions src/ReportingApi/IReportBody.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
namespace ReportingApi;

public interface IReportBody
{
}
public interface IReportBody;
8 changes: 5 additions & 3 deletions src/ReportingApi/ReportingApi.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<LangVersion>11.0</LangVersion>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<LangVersion>12.0</LangVersion>
<Nullable>enable</Nullable>
<PackageLicense>MIT</PackageLicense>
<RepositoryUrl>https://github.com/aviationexam/reporting-api</RepositoryUrl>
Expand All @@ -19,6 +19,8 @@
<PackageReference Include="System.Text.Json" Version="7.0.3" />
</ItemGroup>


<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="System.Text.Json" Version="8.0.0" />
</ItemGroup>

</Project>

0 comments on commit 60e0f34

Please sign in to comment.