Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support net8.0 #75

Merged
merged 4 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
name: build and release a new package version

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

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

- name: Install dependencies
working-directory: ./src
run: dotnet restore logzio-dotnet.sln

- name: Build and release package
working-directory: ./src
run: |
dotnet publish -c Release -f net8.0
dotnet publish -c Release -f net6.0
dotnet pack --configuration Release
dotnet pack --configuration Release -p:TargetFrameworks="net8.0;net6.0"
dotnet nuget push "./Log4netShipper/bin/Release/Logzio.DotNet.Log4net.${{ github.event.release.tag_name }}.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
dotnet nuget push "./NLogShipper/bin/Release/Logzio.DotNet.NLog.${{ github.event.release.tag_name }}.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
7 changes: 2 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,12 @@ on:
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: ['2.0', '3.0', '5.0', '6.0', '7.0', '8.0']
steps:
- uses: actions/checkout@v4
- name: Setup .NET ${{ matrix.dotnet-version }}
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version }}
dotnet-version: 8.0
- name: Display dotnet version
run: dotnet --version
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions src/Core/Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>

<TargetFrameworks Condition=" '$(TargetFrameworks)' == '' ">net5.0;netcoreapp3.1;netstandard1.3;netstandard2.0;net6.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(TargetFrameworks)' == '' ">net5.0;netcoreapp3.1;netstandard1.3;netstandard2.0;net6.0;net8.0</TargetFrameworks>
<LangVersion>9.0</LangVersion>

<AssemblyName>Logzio.DotNet.Core</AssemblyName>
Expand All @@ -13,7 +13,7 @@

<IsPackable>false</IsPackable>

<PackageVersion>1.1.1</PackageVersion>
<PackageVersion>1.2.0</PackageVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
8 changes: 6 additions & 2 deletions src/Log4netShipper/Log4netShipper.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks Condition=" '$(TargetFrameworks)' == '' ">net5.0;netcoreapp3.1;netstandard1.3;netstandard2.0;net6.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(TargetFrameworks)' == '' ">net5.0;netcoreapp3.1;netstandard1.3;netstandard2.0;net6.0;net8.0</TargetFrameworks>

<AssemblyName>Logzio.DotNet.Log4net</AssemblyName>

Expand All @@ -14,7 +14,7 @@
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>git://github.com/logzio/logzio-dotnet</RepositoryUrl>
<PackageVersion>1.1.1</PackageVersion>
<PackageVersion>1.2.0</PackageVersion>
<PackageReleaseNotes>Option to format message as json</PackageReleaseNotes>
<PackageReadmeFile>log4net.md</PackageReadmeFile>
</PropertyGroup>
Expand Down Expand Up @@ -43,6 +43,10 @@
<PackageReference Include="OpenTelemetry" Version="1.3.1" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="OpenTelemetry" Version="1.8.1" />
</ItemGroup>

<ItemGroup>
<None Include="..\..\docs\log4net.md" Pack="true" PackagePath="\"/>
</ItemGroup>
Expand Down
10 changes: 7 additions & 3 deletions src/NLogShipper/NLogShipper.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks Condition=" '$(TargetFrameworks)' == '' ">net5.0;netcoreapp3.1;netstandard1.3;netstandard2.0;net6.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(TargetFrameworks)' == '' ">net5.0;netcoreapp3.1;netstandard1.3;netstandard2.0;net6.0;net8.0</TargetFrameworks>

<AssemblyName>Logzio.DotNet.NLog</AssemblyName>

Expand All @@ -14,7 +14,7 @@
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>git://github.com/logzio/logzio-dotnet</RepositoryUrl>
<PackageVersion>1.1.1</PackageVersion>
<PackageVersion>1.2.0</PackageVersion>
<PackageReleaseNotes>Option to format message as json</PackageReleaseNotes>
<PackageReadmeFile>nlog.md</PackageReadmeFile>
</PropertyGroup>
Expand All @@ -28,7 +28,7 @@
<ItemGroup>
<ProjectReference Include="..\Core\Core.csproj" PrivateAssets="all" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="OpenTelemetry" Version="1.3.1" />
</ItemGroup>
Expand All @@ -43,6 +43,10 @@
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="OpenTelemetry" Version="1.3.1" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="OpenTelemetry" Version="1.8.1" />
</ItemGroup>

<ItemGroup>
<None Include="..\..\docs\nlog.md" Pack="true" PackagePath="\"/>
Expand Down
2 changes: 1 addition & 1 deletion src/UnitTests/UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net5.0;netcoreapp3.1;net6.0</TargetFrameworks>
<TargetFrameworks>net5.0;netcoreapp3.1;net6.0;net8.0;net7.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
Expand Down
Loading