Skip to content

Commit

Permalink
Add .NET 7 support. (#3)
Browse files Browse the repository at this point in the history
* Add .NET 7 support.

* Set up .NET 7 in GH actions.
  • Loading branch information
dmytro-khmara authored Jun 11, 2023
1 parent 40fc723 commit 60e0779
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 7 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ jobs:
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up .NET 7
uses: actions/setup-dotnet@v3
- name: Build
run: docker build --target build .
- name: Test
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ jobs:
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up .NET 7
uses: actions/setup-dotnet@v3
- name: Set VERSION variable from tag
run: echo "VERSION=${GITHUB_REF/refs\/tags\/}" >> $GITHUB_ENV
- name: Build
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /source

# copy csproj and restore as distinct layers
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Allows to use [StrEnum](https://github.com/StrEnum/StrEnum/) string enums with Entity Framework Core.

Supports EF Core 3.1–6.0
Supports EF Core 3.1–7.0

## Installation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/StrEnum/StrEnum.EntityFrameworkCore</RepositoryUrl>

<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0</TargetFrameworks>
<LangVersion>10.0</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand All @@ -30,6 +30,10 @@
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="[3.1.0,7.0.0)" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="[3.1.0,8.0.0)" />
</ItemGroup>

<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute">
<_Parameter1>$(AssemblyName).UnitTests</_Parameter1>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>10.0</LangVersion>
<IsPackable>false</IsPackable>
Expand All @@ -10,7 +10,7 @@
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.6.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="StrEnum" Version="2.0.1" />
<PackageReference Include="StrEnum" Version="2.0.2" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down

0 comments on commit 60e0779

Please sign in to comment.