Skip to content

Commit

Permalink
Add .net 8 target (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
trejjam authored Nov 15, 2023
1 parent 7c4fa9c commit 222f1ef
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 18 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
with:
dotnet-version: |
7.0.x
8.0.x
- uses: actions/checkout@v4
- name: Restore
run: dotnet restore --nologo
Expand All @@ -37,9 +38,9 @@ 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: .Net Format
run: dotnet format --no-restore --verify-no-changes -v diag
1 change: 1 addition & 0 deletions .github/workflows/nightly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
with:
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
5 changes: 3 additions & 2 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
with:
dotnet-version: |
7.0.x
8.0.x
- uses: actions/checkout@v4
- name: Restore
run: dotnet restore --nologo
Expand All @@ -31,9 +32,9 @@ 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: .Net Format
run: dotnet format --no-restore --verify-no-changes -v diag
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
with:
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 Expand Up @@ -44,4 +45,3 @@ jobs:
run: dotnet nuget push 'nuget-packages/*.nupkg' --api-key ${{ secrets.GITHUB_TOKEN }} --source github
- name: Push package to Nuget
run: dotnet nuget push 'nuget-packages/*.nupkg' --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json

Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<LangVersion>10.0</LangVersion>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>12.0</LangVersion>
<Nullable>enable</Nullable>
<VersionPrefix>1.0.0</VersionPrefix>
<IsPackable>false</IsPackable>
Expand All @@ -13,13 +13,13 @@
<ProjectReference Include="..\..\src\PayPal.Sdk.Checkout\PayPal.Sdk.Checkout.csproj" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0' ">
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.4" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="7.0.1" />
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
12 changes: 10 additions & 2 deletions src/PayPal.Sdk.Checkout/PayPal.Sdk.Checkout.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>10.0</LangVersion>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<LangVersion>12.0</LangVersion>
<Nullable>enable</Nullable>
<VersionPrefix>1.0.0</VersionPrefix>
<Owners>PayPal</Owners>
Expand All @@ -28,4 +28,12 @@
<PackageReference Include="System.Text.Json" Version="7.0.3" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.0" />
<PackageReference Include="System.Text.Json" Version="8.0.0" />
</ItemGroup>

</Project>
17 changes: 15 additions & 2 deletions tests/PayPal.Sdk.Checkout.Test/PayPal.Sdk.Checkout.Test.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>10.0</LangVersion>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<LangVersion>12.0</LangVersion>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<VersionPrefix>1.0.0</VersionPrefix>
Expand Down Expand Up @@ -32,6 +32,19 @@
<PackageReference Include="Microsoft.Extensions.Options" Version="7.0.1" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
<Content Update="appsettings.json5" CopyToPublishDirectory="Always" CopyToOutputDirectory="Always" />
<Content Update="*.appsettings.json5" CopyToPublishDirectory="Always" CopyToOutputDirectory="Always" />
Expand Down

0 comments on commit 222f1ef

Please sign in to comment.