Skip to content

Commit

Permalink
feat: Add support for .NET 8.0 + Update package references
Browse files Browse the repository at this point in the history
- Updated the .NET version from 6.0.x to 8.0.x in the workflow file.
- Removed the Markdig package reference from the test project.
- Updated the Markdig package reference in the main project from version 0.32.0 to 0.36.2.
- Changed the target frameworks in the main project to net6.0 and net8.0.

These changes ensure compatibility with newer versions of .NET and update dependencies for improved functionality and security.
  • Loading branch information
SakuraIsayeki committed Mar 24, 2024
1 parent 2819d87 commit 627818e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 17 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.

- name: Setup .NET 6.0
uses: actions/setup-dotnet@v2
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
dotnet-version: '8.0.x'

- uses: dotnet/[email protected].1
- uses: dotnet/[email protected]
id: nbgv

- name: Restore dependencies
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/nuget-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ jobs:
]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.

- name: Setup .NET 6.0
uses: actions/setup-dotnet@v2
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x

- uses: dotnet/[email protected].1
- uses: dotnet/[email protected]
id: nbgv

- name: Restore dependencies
Expand All @@ -61,14 +61,14 @@ jobs:
run: dotnet build

- id: is-public-release
uses: ASzc/change-string-case-action@v2
uses: ASzc/change-string-case-action@v4
with:
string: ${{ steps.nbgv.outputs.PublicRelease }}

# Publish
- name: Build, Pack & Publish ${{ matrix.project.name }} to ${{ matrix.nuget.name }}
id: publish_nuget
uses: Rebel028/publish-nuget@v2.7.0
uses: Rebel028/publish-nuget@v2.8.0
with:
# Filepath of the project to be packaged, relative to root of repository
PROJECT_FILE_PATH: ${{ matrix.project.path }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Markdig" Version="0.32.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0"/>
<PackageReference Include="NSubstitute" Version="5.0.0" />
<PackageReference Include="NSubstitute.Analyzers.CSharp" Version="1.0.16">
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>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
Expand All @@ -18,13 +18,13 @@
<RepositoryType>git</RepositoryType>

<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageLicenseExpression>ISC</PackageLicenseExpression>
<PackageIcon>icon.png</PackageIcon>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ColorCode.HTML" Version="2.0.15" />
<PackageReference Include="Markdig" Version="0.32.0" />
<PackageReference Include="Markdig" Version="0.36.2" />
</ItemGroup>

</Project>

0 comments on commit 627818e

Please sign in to comment.