Skip to content
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
24 changes: 8 additions & 16 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download release assets
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release download "${{ github.event.release.tag_name }}" \
--pattern "*.nupkg" \
--dir ./artifacts \
--repo "${{ github.repository }}"

- name: Setup .NET
uses: actions/setup-dotnet@v4
Expand All @@ -27,18 +31,6 @@ jobs:
9.0.x
10.0.x

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore

- name: Test
run: dotnet test --configuration Release --no-build --verbosity normal

- name: Pack NuGet packages
run: dotnet pack --configuration Release --no-build --output ./artifacts

- name: Verify packages
run: |
echo "Packages to be published:"
Expand Down
18 changes: 17 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<PropertyGroup Label="Project">
<Product>MyCSharp.HttpUserAgentParser</Product>
<Authors>MyCSharp, BenjaminAbt, gfoidl</Authors>
<Company>MyCSharp.de</Company>
<Company>myCSharp.de</Company>
<Copyright>myCSharp.de</Copyright>
</PropertyGroup>

<PropertyGroup Label="Vars">
Expand Down Expand Up @@ -73,6 +74,21 @@
<NuGetAuditLevel>low</NuGetAuditLevel>
</PropertyGroup>

<!-- Global coverage settings applied to all test projects -->
<PropertyGroup Condition="'$(IsTestProject)' == 'true'" Label="Coverage">
<CollectCoverage>true</CollectCoverage>
<CoverletOutputFormat>lcov,opencover,cobertura</CoverletOutputFormat>
<CoverletOutput>$(MSBuildThisFileDirectory)TestResults/coverage/$(MSBuildProjectName).</CoverletOutput>
<ExcludeByAttribute>GeneratedCodeAttribute,CompilerGeneratedAttribute,ExcludeFromCodeCoverageAttribute</ExcludeByAttribute>
<ExcludeByFile>**/*Program.cs;**/*Startup.cs;**/*GlobalUsings.cs</ExcludeByFile>
<UseSourceLink>true</UseSourceLink>
<!-- Enforce high line coverage; branch coverage is informative only -->
<!-- Note: Set to 96 to account for performance-optimized helper methods and framework-specific code paths -->
<Threshold>96</Threshold>
<ThresholdType>line</ThresholdType>
<ThresholdStat>total</ThresholdStat>
</PropertyGroup>

<ItemGroup Label="Default Test Dependencies" Condition="'$(IsTestProject)' == 'true'">
<PackageReference Include="coverlet.msbuild" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ by [@BenjaminAbt](https://github.com/BenjaminAbt) and [@gfoidl](https://github.c

MIT License

Copyright (c) 2021-2025 MyCSharp
Copyright (c) 2021-2026 myCSharp.de

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion src/HttpUserAgentParser/HttpUserAgentParser.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</ItemGroup>

<ItemGroup>
<InternalsVisibleTo Include="MyCSharp.HttpUserAgentParser.UnitTests" />
<InternalsVisibleTo Include="MyCSharp.HttpUserAgentParser.UnitTests" PublicKey="$(PublicKey)" />
<InternalsVisibleTo Include="MyCSharp.HttpUserAgentParser.AspNetCore" PublicKey="$(PublicKey)" />
<InternalsVisibleTo Include="MyCSharp.HttpUserAgentParser.MemoryCache" PublicKey="$(PublicKey)" />
</ItemGroup>
Expand Down