Skip to content

Commit

Permalink
More .net 7/8 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
scottbilas committed Nov 22, 2023
1 parent 93fe2cd commit 8d34846
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ jobs:
with:
dotnet-version: 7.0.x

- name: Build for publish
run: dotnet publish -c Release

- name: Run tests
run: |
dotnet test --nologo -l:"console;verbosity=normal" -c Release
- name: Pack nuget
run: dotnet pack src\Core\Core.csproj -c Release

- name: Publish NuGet package
run: |
dotnet nuget push publish\Core\*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
2 changes: 1 addition & 1 deletion src/Core/Core-Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup><OkFeatures>T4</OkFeatures></PropertyGroup>
<PropertyGroup><OkFeatures>T4;Net78</OkFeatures></PropertyGroup>
<Import Project="$(OkTargetsRoot)Tests.targets" />

<PropertyGroup>
Expand Down
5 changes: 1 addition & 4 deletions src/Core/Core.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup><OkFeatures>T4</OkFeatures></PropertyGroup>
<PropertyGroup><OkFeatures>T4;Net78</OkFeatures></PropertyGroup>
<Import Project="$(OkTargetsRoot)Library.targets" />

<PropertyGroup>
Expand All @@ -8,9 +8,6 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>CS1591</NoWarn>
<DefineConstants>$(DefineConstants);NICEIO_PUBLIC</DefineConstants>

<TargetFramework />
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<AppendTargetFrameworkToOutputPath>true</AppendTargetFrameworkToOutputPath>

<!-- because it's a package, avoid adding requirements -->
Expand Down
6 changes: 6 additions & 0 deletions targets/Library.targets
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@
<OkFeatures>;$(OkFeatures);</OkFeatures>
</PropertyGroup>

<!--Net78 -->
<PropertyGroup Condition=" $(OkFeatures.Contains(';Net78;')) ">
<TargetFramework />
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
</PropertyGroup>

<!--Core -->
<ItemGroup Condition=" $(OkFeatures.Contains(';Core;')) or $(OkFeatures.Contains(';Docopt;')) ">
<ProjectReference Include="$(OkSrcRoot)Core\Core.csproj" />
Expand Down

0 comments on commit 8d34846

Please sign in to comment.