Skip to content

Commit

Permalink
feat: net8.0 (#712)
Browse files Browse the repository at this point in the history
* chore: added net8.0 target
  • Loading branch information
AndrewTriesToCode committed Aug 25, 2023
1 parent affb66f commit a137dae
Show file tree
Hide file tree
Showing 14 changed files with 348 additions and 199 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/ci.yml
Expand Up @@ -9,22 +9,25 @@ jobs:
build-and-test:
strategy:
matrix:
dotnet: [6.0, 7.0]
dotnet: ["6.0", "7.0", "8.0"]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: checkout repo
uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet }}
dotnet-version: "8.0.100-preview.7.23376.3"

- name: build
run: dotnet build
- name: test Finbuckle.MultiTenant
run: dotnet test -f net${{ matrix.dotnet }}
run: dotnet test --no-build -v q -f net${{ matrix.dotnet }}
working-directory: ./test/Finbuckle.MultiTenant.Test
- name: test Finbuckle.MultiTenant.AspNetCore
run: dotnet test -f net${{ matrix.dotnet }}
run: dotnet test --no-build -v q -f net${{ matrix.dotnet }}
working-directory: ./test/Finbuckle.MultiTenant.AspNetCore.Test
- name: test Finbuckle.MultiTenant.EntityFrameworkCore
run: dotnet test -f net${{ matrix.dotnet }}
run: dotnet test --no-build -v q -f net${{ matrix.dotnet }}
working-directory: ./test/Finbuckle.MultiTenant.EntityFrameworkCore.Test

18 changes: 18 additions & 0 deletions .github/workflows/nuget-push-public.yml
@@ -0,0 +1,18 @@
name: NuGet Push Public

on: [workflow_dispatch]

jobs:
build-test-prep-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: "8.0.100-preview.7.23376.3"
- name: Create the package
run: dotnet test -c Release && dotnet pack --no-build -c Release --output nupkgs
- name: Publish the package to NuGet.org
env:
NUGET_KEY: ${{secrets.NUGET_KEY}}
run: dotnet nuget push nupkgs/*.nupkg -k $NUGET_KEY -s https://api.nuget.org/v3/index.json --skip-duplicate
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,31 @@
name: Release

on: [workflow_dispatch]

jobs:
build-test-prep-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: "8.0.100-preview.7.23376.3"
- uses: actions/setup-node@v3
with:
node-version: 18
- name: build and test
run: |
dotnet restore
dotnet build -c Release --no-restore
dotnet test -c Release --no-build
- name: setup semantic-release
run: |
npm install -D semantic-release
npm install -D @semantic-release/git
npm install -D @semantic-release/changelog
npm install -D @semantic-release/exec
npm install -D conventional-changelog-conventionalcommits
- name: run semantic-release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: npx semantic-release
400 changes: 234 additions & 166 deletions CHANGELOG.md

Large diffs are not rendered by default.

9 changes: 1 addition & 8 deletions README.md
Expand Up @@ -146,14 +146,7 @@ A variety of [sample projects](https://github.com/Finbuckle/Finbuckle.MultiTenan

## Build and Test Status

![Build Status Linux 6.0](https://github.com/Finbuckle/Finbuckle.MultiTenant/actions/workflows/linux-6.0.yml/badge.svg)
![Build Status Linux 6.0](https://github.com/Finbuckle/Finbuckle.MultiTenant/actions/workflows/linux-7.0.yml/badge.svg)

![Build Status MacOS 6.0](https://github.com/Finbuckle/Finbuckle.MultiTenant/actions/workflows/macos-6.0.yml/badge.svg)
![Build Status MacOS 6.0](https://github.com/Finbuckle/Finbuckle.MultiTenant/actions/workflows/macos-7.0.yml/badge.svg)

![Build Status Windows 6.0](https://github.com/Finbuckle/Finbuckle.MultiTenant/actions/workflows/windows-6.0.yml/badge.svg)
![Build Status Windows 6.0](https://github.com/Finbuckle/Finbuckle.MultiTenant/actions/workflows/windows-7.0.yml/badge.svg)
![Build and Test Status](https://github.com/Finbuckle/Finbuckle.MultiTenant/actions/workflows/ci.yml/badge.svg)

## License

Expand Down
9 changes: 1 addition & 8 deletions docs/Introduction.md
Expand Up @@ -7,14 +7,7 @@ Finbuckle.MultiTenant is open source multitenancy middleware library for .NET. I

## Main Build and Test Status

![Build Status Linux 6.0](https://github.com/Finbuckle/Finbuckle.MultiTenant/actions/workflows/linux-6.0.yml/badge.svg)
![Build Status Linux 6.0](https://github.com/Finbuckle/Finbuckle.MultiTenant/actions/workflows/linux-7.0.yml/badge.svg)

![Build Status MacOS 6.0](https://github.com/Finbuckle/Finbuckle.MultiTenant/actions/workflows/macos-6.0.yml/badge.svg)
![Build Status MacOS 6.0](https://github.com/Finbuckle/Finbuckle.MultiTenant/actions/workflows/macos-7.0.yml/badge.svg)

![Build Status Windows 6.0](https://github.com/Finbuckle/Finbuckle.MultiTenant/actions/workflows/windows-6.0.yml/badge.svg)
![Build Status Windows 6.0](https://github.com/Finbuckle/Finbuckle.MultiTenant/actions/workflows/windows-7.0.yml/badge.svg)
![Build and Test Status](https://github.com/Finbuckle/Finbuckle.MultiTenant/actions/workflows/ci.yml/badge.svg)

## License

Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Expand Up @@ -13,7 +13,7 @@
<PackageTags>finbuckle;multitenant;multitenancy;aspnet;aspnetcore;entityframework;entityframework-core;efcore</PackageTags>
<PackageIcon>finbuckle-128x128.png</PackageIcon>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<!-- <NoWarn>CS1591</NoWarn>-->
<NoWarn>CS1591</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net7.0;net6.0</TargetFrameworks>
<TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks>
<Title>Finbuckle.MultiTenant.AspNetCore</Title>
<Description>ASP.NET Core support for Finbuckle.MultiTenant.</Description>
<Nullable>enable</Nullable>
Expand All @@ -13,6 +13,12 @@
</ItemGroup>

<Choose>
<When Condition=" '$(TargetFramework)' == 'net8.0' ">
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.0-*" />
</ItemGroup>
</When>
<When Condition=" '$(TargetFramework)' == 'net7.0' ">
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
Expand Down
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net7.0;net6.0</TargetFrameworks>
<TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks>
<Title>Finbuckle.MultiTenant.EntityFrameworkCore</Title>
<Description>Entity Framework Core support for Finbuckle.MultiTenant.</Description>
<Nullable>enable</Nullable>
Expand All @@ -13,6 +13,13 @@
</ItemGroup>

<Choose>
<When Condition=" '$(TargetFramework)' == 'net8.0' ">
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.0-*" />
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="8.0.0-*" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.0-*" />
</ItemGroup>
</When>
<When Condition=" '$(TargetFramework)' == 'net7.0' ">
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="7.0.0" />
Expand Down
13 changes: 12 additions & 1 deletion src/Finbuckle.MultiTenant/Finbuckle.MultiTenant.csproj
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net7.0;net6.0</TargetFrameworks>
<TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks>
<Title>Finbuckle.MultiTenant</Title>
<Description>Main library package for Finbuckle.MultiTenant.</Description>
<Nullable>enable</Nullable>
Expand All @@ -12,6 +12,17 @@
</ItemGroup>

<Choose>
<When Condition=" '$(TargetFramework)' == 'net8.0' ">
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0-*" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0-*" />
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.0-*" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0-*" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0-*" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0-*" />
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0-*" />
</ItemGroup>
</When>
<When Condition=" '$(TargetFramework)' == 'net7.0' ">
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
Expand Down
Expand Up @@ -7,7 +7,7 @@ namespace Finbuckle.MultiTenant.Options;
/// Configures options per-tenant.
/// </summary>
/// <typeparam name="TOptions">Options type being configured.</typeparam>
/// <typeparam name="T">A type implementing ITenantInfo.</typeparam>
/// <typeparam name="TTenantInfo">A type implementing ITenantInfo.</typeparam>
public interface ITenantConfigureNamedOptions<TOptions, TTenantInfo>
where TOptions : class, new()
where TTenantInfo : class, ITenantInfo, new()
Expand All @@ -17,6 +17,6 @@ public interface ITenantConfigureNamedOptions<TOptions, TTenantInfo>
/// </summary>
/// <param name="name">The name of the option to be configured.</param>
/// <param name="options">The options class instance to be configured.</param>
/// <typeparam name="T">A type implementing ITenantInfo.</typeparam>
/// <param name="tenantInfo">The TTenantInfo instance for the options being configured.</param>
void Configure(string name, TOptions options, TTenantInfo tenantInfo);
}
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net7.0;net6.0</TargetFrameworks>
<TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks>
<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand All @@ -10,6 +10,12 @@
</ItemGroup>

<Choose>
<When Condition=" '$(TargetFramework)' == 'net8.0' ">
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="8.0.*-*" />
</ItemGroup>
</When>
<When Condition=" '$(TargetFramework)' == 'net7.0' ">
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
Expand Down
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net7.0;net6.0</TargetFrameworks>
<TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks>
<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand All @@ -11,6 +11,12 @@
</ItemGroup>

<Choose>
<When Condition=" '$(TargetFramework)' == 'net8.0' ">
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.*-*" />
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="8.0.*-*" />
</ItemGroup>
</When>
<When Condition=" '$(TargetFramework)' == 'net7.0' ">
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.*" />
Expand Down
15 changes: 11 additions & 4 deletions test/Finbuckle.MultiTenant.Test/Finbuckle.MultiTenant.Test.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net7.0;net6.0</TargetFrameworks>
<TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks>
<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand All @@ -10,11 +10,18 @@
</ItemGroup>

<Choose>
<When Condition=" '$(TargetFramework)' == 'net8.0' ">
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.*-*" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.*-*" />
<PackageReference Include="Microsoft.Extensions.Options.DataAnnotations" Version="8.0.*-*" />
</ItemGroup>
</When>
<When Condition=" '$(TargetFramework)' == 'net7.0' ">
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.DataAnnotations" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.*" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.*" />
<PackageReference Include="Microsoft.Extensions.Options.DataAnnotations" Version="7.0.*" />
</ItemGroup>
</When>
<When Condition=" '$(TargetFramework)' == 'net6.0' ">
Expand Down

0 comments on commit a137dae

Please sign in to comment.