Skip to content

Commit a47211d

Browse files
authored
add updates to devops, nuget, packages, readmes and sdk (#41)
* add updates to devops, nuget, packages, readmes and sdk * add version bump
1 parent 8ecef41 commit a47211d

File tree

24 files changed

+232
-100
lines changed

24 files changed

+232
-100
lines changed

.github/workflows/ci.yml

+5-7
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,14 @@ on:
1111
env:
1212
BuildConfig: Release
1313
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
14-
DOTNET_VERSION: '6.0.100' # https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/6.0/releases.json
1514

1615
jobs:
1716
build:
1817
runs-on: ubuntu-latest
1918
steps:
2019

2120
- name: Cancel previous builds in PR
22-
uses: styfle/[email protected].0
21+
uses: styfle/[email protected].1
2322
with:
2423
access_token: ${{ github.token }}
2524

@@ -28,9 +27,9 @@ jobs:
2827
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
2928

3029
- name: 'Install .NET SDK'
31-
uses: actions/setup-dotnet@v1
30+
uses: actions/setup-dotnet@v3
3231
with:
33-
dotnet-version: ${{ env.DOTNET_VERSION }}
32+
global-json-file: ./global.json
3433

3534
- name: Versioning
3635
uses: dotnet/nbgv@master
@@ -54,9 +53,8 @@ jobs:
5453
/p:Version=${{ steps.nbgv.outputs.NuGetPackageVersion }}
5554

5655
- name: Push to NuGet
57-
## push only stable packages
58-
if: github.ref == 'refs/heads/main'
5956
run: dotnet nuget push **/*.nupkg
6057
--api-key ${{ secrets.NUGET_DEPLOY_KEY }}
6158
--source https://api.nuget.org/v3/index.json
62-
--no-symbols 1
59+
--no-symbols
60+
--skip-duplicate

Directory.Build.props

+21-9
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,33 @@
11
<Project>
22

33
<PropertyGroup>
4-
<MinClientVersion>2.12</MinClientVersion>
54
<Authors>MyCSharp.de, Benjamin Abt, Günther Foidl and Contributors</Authors>
6-
<PackageProjectUrl>https://github.com/mycsharp/HttpUserAgentParser</PackageProjectUrl>
7-
<PackageLicenseExpression>MIT</PackageLicenseExpression>
5+
<Product>MyCSharp.HttpUserAgentParser</Product>
86
<DefaultLanguage>en-US</DefaultLanguage>
9-
<Description>HTTP User Agent Parser for .NET</Description>
107
<NoPackageAnalysis>true</NoPackageAnalysis>
11-
<LangVersion>preview</LangVersion>
12-
<Nullable>enable</Nullable>
13-
<EmbedUntrackedSources>true</EmbedUntrackedSources>
14-
<PublishRepositoryUrl>true</PublishRepositoryUrl>
158
<DebugType>embedded</DebugType>
9+
</PropertyGroup>
10+
11+
<PropertyGroup Label="Env">
12+
1613
<IsTestProject>$(MSBuildProjectName.Contains('Test'))</IsTestProject>
1714
<IsBenchmarkProject>$(MsBuildProjectName.Contains('Benchmark'))</IsBenchmarkProject>
15+
</PropertyGroup>
16+
17+
<PropertyGroup Label="Package">
18+
<PackageProjectUrl>https://github.com/mycsharp/HttpUserAgentParser</PackageProjectUrl>
19+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
20+
<Description>HTTP User Agent Parser for .NET</Description>
21+
<MinClientVersion>2.12</MinClientVersion>
1822
<IsPackable>false</IsPackable>
23+
<PackageTags>UserAgent, User Agent, Parse, Browser, Client, Detector, Detection, Console, ASP, Desktop, Mobile</PackageTags>
24+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
25+
</PropertyGroup>
26+
27+
<PropertyGroup Label="C#">
28+
<LangVersion>12.0</LangVersion>
29+
<Nullable>enable</Nullable>
30+
<ImplicitUsings>enable</ImplicitUsings>
1931
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
2032
</PropertyGroup>
2133

@@ -35,5 +47,5 @@
3547
<Error Code="420" Text="Blocked package dependency detected: %(PackageDependencies.Identity)"
3648
Condition="'%(PackageDependencies.Identity)' == 'Devlooped.SponsorLink'" />
3749
</Target>
38-
50+
3951
</Project>

Directory.Packages.props

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<Project>
2+
<PropertyGroup>
3+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
4+
</PropertyGroup>
5+
<ItemGroup Label=".NET Dependencies">
6+
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="7.0.0" />
7+
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
8+
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
9+
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
10+
<PackageVersion Include="NaughtyStrings" Version="2.4.1" />
11+
</ItemGroup>
12+
<ItemGroup Label="ASP.NET Core Dependencies">
13+
<PackageVersion Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
14+
<PackageVersion Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
15+
</ItemGroup>
16+
<ItemGroup Label="Libraries for comparison">
17+
<PackageVersion Include="UAParser" Version="3.1.47" />
18+
<PackageVersion Include="DeviceDetector.NET" Version="4.3.0" />
19+
<PackageVersion Include="Ng.UserAgentService" Version="1.1.0" />
20+
</ItemGroup>
21+
<ItemGroup Label="Tests / Performance">
22+
<PackageVersion Include="BenchmarkDotNet" Version="0.13.11" />
23+
<PackageVersion Include="BenchmarkDotNet.Diagnostics.Windows" Version="0.13.11" />
24+
<PackageVersion Include="NSubstitute" Version="5.1.0" />
25+
<PackageVersion Include="FluentAssertions" Version="7.0.0-alpha.2" />
26+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.9.0-preview-23503-02" />
27+
<PackageVersion Include="xunit" Version="2.6.3" />
28+
<PackageVersion Include="xunit.runner.console" Version="2.6.3">
29+
<PrivateAssets>all</PrivateAssets>
30+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
31+
</PackageVersion>
32+
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.5">
33+
<PrivateAssets>all</PrivateAssets>
34+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
35+
</PackageVersion>
36+
<PackageVersion Include="coverlet.msbuild" Version="6.0.0">
37+
<PrivateAssets>all</PrivateAssets>
38+
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
39+
</PackageVersion>
40+
</ItemGroup>
41+
</Project>

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021 MyCSharp
3+
Copyright (c) 2021-2023 MyCSharp
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

MyCSharp.HttpUserAgentParser.sln

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_", "_", "{5738CE0D-5E6E-47
2525
.gitignore = .gitignore
2626
.github\workflows\ci.yml = .github\workflows\ci.yml
2727
Directory.Build.props = Directory.Build.props
28+
Directory.Packages.props = Directory.Packages.props
29+
global.json = global.json
2830
LICENSE = LICENSE
2931
NuGet.config = NuGet.config
3032
README.md = README.md
@@ -35,7 +37,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "perf", "perf", "{FAAD18A0-E
3537
EndProject
3638
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyCSharp.HttpUserAgentParser.Benchmarks", "perf\MyCSharp.HttpUserAgentParser.Benchmarks\MyCSharp.HttpUserAgentParser.Benchmarks.csproj", "{A0D213E9-6408-46D1-AFAF-5096C2F6E027}"
3739
EndProject
38-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyCSharp.HttpUserAgentParser.TestHelpers", "tests\MyCSharp.HttpUserAgentParser.TestHelpers\MyCSharp.HttpUserAgentParser.TestHelpers.csproj", "{165EE915-1A4F-4875-90CE-1A2AE1540AE7}"
40+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyCSharp.HttpUserAgentParser.TestHelpers", "tests\MyCSharp.HttpUserAgentParser.TestHelpers\MyCSharp.HttpUserAgentParser.TestHelpers.csproj", "{165EE915-1A4F-4875-90CE-1A2AE1540AE7}"
3941
EndProject
4042
Global
4143
GlobalSection(SolutionConfigurationPlatforms) = preSolution

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ by [@BenjaminAbt](https://github.com/BenjaminAbt) and [@gfoidl](https://github.c
141141

142142
MIT License
143143

144-
Copyright (c) 2021 MyCSharp
144+
Copyright (c) 2021-2023 MyCSharp
145145

146146
Permission is hereby granted, free of charge, to any person obtaining a copy
147147
of this software and associated documentation files (the "Software"), to deal
@@ -160,3 +160,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
160160
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
161161
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
162162
SOFTWARE.
163+

global.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"sdk": {
3+
"version": "8.0.100"
4+
}
5+
}

perf/MyCSharp.HttpUserAgentParser.Benchmarks/MyCSharp.HttpUserAgentParser.Benchmarks.csproj

+9-9
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
66
<Nullable>disable</Nullable>
77
</PropertyGroup>
88

@@ -15,18 +15,18 @@
1515
</PropertyGroup>
1616

1717
<ItemGroup>
18-
<PackageReference Include="BenchmarkDotNet" Version="0.13.2" />
19-
<PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" Version="0.13.2" Condition="'$(OS)' == 'Windows_NT'" />
18+
<PackageReference Include="BenchmarkDotNet" />
19+
<PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" Condition="'$(OS)' == 'Windows_NT'" />
2020
</ItemGroup>
2121

22-
<ItemGroup>
23-
<ProjectReference Include="..\..\src\MyCSharp.HttpUserAgentParser\MyCSharp.HttpUserAgentParser.csproj" />
22+
<ItemGroup Label="Libraries for comparison">
23+
<PackageReference Include="UAParser" />
24+
<PackageReference Include="DeviceDetector.NET" />
25+
<PackageReference Include="Ng.UserAgentService" />
2426
</ItemGroup>
2527

26-
<ItemGroup Label="Libraries for comparison">
27-
<PackageReference Include="UAParser" Version="3.1.47" />
28-
<PackageReference Include="DeviceDetector.NET" Version="4.3.0" />
29-
<PackageReference Include="Ng.UserAgentService" Version="1.1.0" />
28+
<ItemGroup>
29+
<ProjectReference Include="..\..\src\MyCSharp.HttpUserAgentParser\MyCSharp.HttpUserAgentParser.csproj" />
3030
</ItemGroup>
3131

3232
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021-2023 MyCSharp
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

src/MyCSharp.HttpUserAgentParser.AspNetCore/MyCSharp.HttpUserAgentParser.AspNetCore.csproj

+11-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,20 @@
33
<PropertyGroup>
44
<Product>HTTP User Agent Parser Extensions for ASP.NET Core</Product>
55
<Description>HTTP User Agent Parser Extensions for ASP.NET Core</Description>
6-
<TargetFramework>net6.0</TargetFramework>
6+
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
7+
</PropertyGroup>
8+
9+
<PropertyGroup Label="Package">
710
<IsPackable>true</IsPackable>
11+
<PackageReadmeFile>readme.md</PackageReadmeFile>
12+
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
813
</PropertyGroup>
914

15+
<ItemGroup>
16+
<None Include="readme.md" Pack="true" PackagePath="" />
17+
<None Include="LICENSE.txt" Pack="true" PackagePath="" />
18+
</ItemGroup>
19+
1020
<ItemGroup>
1121
<FrameworkReference Include="Microsoft.AspNetCore.App" />
1222
</ItemGroup>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# MyCSharp.HttpUserAgentParser
2+
3+
Parsing HTTP User Agents with .NET
4+
5+
https://github.com/mycsharp/HttpUserAgentParser
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021-2023 MyCSharp
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

src/MyCSharp.HttpUserAgentParser.MemoryCache/MyCSharp.HttpUserAgentParser.MemoryCache.csproj

+11-5
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,23 @@
33
<PropertyGroup>
44
<Product>HTTP User Agent Parser Extensions for IMemoryCache</Product>
55
<Description>HTTP User Agent Parser Extensions for IMemoryCache</Description>
6-
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0</TargetFrameworks>
6+
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
7+
</PropertyGroup>
8+
9+
<PropertyGroup Label="Package">
710
<IsPackable>true</IsPackable>
11+
<PackageReadmeFile>readme.md</PackageReadmeFile>
12+
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
813
</PropertyGroup>
914

10-
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
11-
<Compile Include="..\NetStandard2.0-Shim.cs" />
15+
<ItemGroup>
16+
<None Include="readme.md" Pack="true" PackagePath="" />
17+
<None Include="LICENSE.txt" Pack="true" PackagePath="" />
1218
</ItemGroup>
1319

1420
<ItemGroup>
15-
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="6.0.0" />
16-
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="6.0.1" />
21+
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" />
22+
<PackageReference Include="Microsoft.Extensions.Caching.Memory" />
1723
</ItemGroup>
1824

1925
<ItemGroup>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# MyCSharp.HttpUserAgentParser
2+
3+
Parsing HTTP User Agents with .NET
4+
5+
https://github.com/mycsharp/HttpUserAgentParser
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021-2023 MyCSharp
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

src/MyCSharp.HttpUserAgentParser/MyCSharp.HttpUserAgentParser.csproj

+11-5
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,23 @@
33
<PropertyGroup>
44
<Product>HTTP User Agent Parser</Product>
55
<Description>Parses user agents for Browser, Platform and Bots.</Description>
6-
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0</TargetFrameworks>
6+
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
7+
</PropertyGroup>
8+
9+
<PropertyGroup Label="Package">
710
<IsPackable>true</IsPackable>
11+
<PackageReadmeFile>readme.md</PackageReadmeFile>
12+
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
813
</PropertyGroup>
914

10-
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
11-
<Compile Include="..\NetStandard2.0-Shim.cs" />
15+
<ItemGroup>
16+
<None Include="readme.md" Pack="true" PackagePath="" />
17+
<None Include="LICENSE.txt" Pack="true" PackagePath="" />
1218
</ItemGroup>
1319

1420
<ItemGroup>
15-
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
16-
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
21+
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" />
22+
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
1723
</ItemGroup>
1824

1925
<ItemGroup>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# MyCSharp.HttpUserAgentParser
2+
3+
Parsing HTTP User Agents with .NET
4+
5+
https://github.com/mycsharp/HttpUserAgentParser

0 commit comments

Comments
 (0)