build: 📦 nuget 构建相关 (#4)

This commit is contained in:
nsnail 2023-12-14 16:46:09 +08:00 committed by GitHub
parent cf2988b389
commit cc703816ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 29 additions and 21 deletions

View File

@ -8,4 +8,4 @@ All notable changes to this project will be documented in this file. See [standa
### Features
* ++ ([e41652d](https://github.com/nsnail/NSExt/commit/e41652d553beda7a2eb1600da4795e07f4260330))
* 增加一些扩展方法 ([1f26d0f](https://github.com/nsnail/NSExt/commit/1f26d0f28098f7ee98a9a5482096aecd53b85e04))
* 增加一些扩展方法 ([1f26d0f](https://github.com/nsnail/NSExt/commit/1f26d0f28098f7ee98a9a5482096aecd53b85e04))

View File

@ -21,6 +21,7 @@
<Product>NSExt</Product>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/nsnail/NSExt.git</RepositoryUrl>
<RootNamespace>NSExt</RootNamespace>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<Title>$(AssemblyName)</Title>
</PropertyGroup>

View File

@ -13,13 +13,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "meta", "meta", "{5198A03D-0
.editorconfig = .editorconfig
.gitattributes = .gitattributes
.gitignore = .gitignore
CHANGELOG.md = CHANGELOG.md
Directory.Build.props = Directory.Build.props
dotnet-tools.json = dotnet-tools.json
global.json = global.json
key.snk = key.snk
LICENSE = LICENSE
NSExt.sln.DotSettings = NSExt.sln.DotSettings
NuGet.Config = NuGet.Config
nuget.config = nuget.config
package.json = package.json
README.md = README.md
README.zh-CN.md = README.zh-CN.md
@ -56,6 +57,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{8E4C93BA
code.quality.props = build/code.quality.props
copy.pkg.xml.comment.files.targets = build/copy.pkg.xml.comment.files.targets
minver.targets = build/minver.targets
nuget.package.props = build/nuget.package.props
prebuild.targets = build/prebuild.targets
stylecop.analyzers.ruleset = build/stylecop.analyzers.ruleset
EndProjectSection

20
build/nuget.package.props Normal file
View File

@ -0,0 +1,20 @@
<Project>
<PropertyGroup>
<AssemblyOriginatorKeyFile>../../../key.snk</AssemblyOriginatorKeyFile>
<DelaySign>false</DelaySign>
<EmbedAllSources>true</EmbedAllSources>
<IncludeSymbols>true</IncludeSymbols>
<IsPackable>true</IsPackable>
<PackageIcon>logo.png</PackageIcon>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageTags>extensions</PackageTags>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<SignAssembly>true</SignAssembly>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
<ItemGroup>
<None Include="../../../assets/logo.png" Pack="true" PackagePath="/"/>
<None Include="../../../README.md" Pack="true" PackagePath="/"/>
</ItemGroup>
</Project>

View File

@ -11,4 +11,4 @@
"path": "node_modules/cz-git"
}
}
}
}

View File

@ -1,4 +1,4 @@
dotnet jb cleanupcode --no-build --include = $( $( git status --porcelain | Where-Object { $_ -match "^\s*[MA]" } | ForEach-Object { $_.TrimStart(" M").TrimStart(" A") } ) -join ";" ) ../NSExt.sln
jb cleanupcode --no-build --include = $( $( git status --porcelain | Where-Object { $_ -match "^\s*[MA]" } | ForEach-Object { $_.TrimStart(" M").TrimStart(" A") } ) -join ";" ) ../NSExt.sln
dot rbom -w -e refs -e .git -e node_modules ../
dot trim -w -e refs -e .git -e node_modules ../
dot tolf -w -e refs -e .git -e node_modules ../

View File

@ -1 +1 @@
dotnet jb cleanupcode --no-build ../NSExt.sln
jb cleanupcode --no-build ../NSExt.sln

View File

@ -1,30 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyOriginatorKeyFile>../../../key.snk</AssemblyOriginatorKeyFile>
<DelaySign>false</DelaySign>
<EmbedAllSources>true</EmbedAllSources>
<EmbedUntrackedSource>true</EmbedUntrackedSource>
<IncludeSymbols>true</IncludeSymbols>
<IsPackable>true</IsPackable>
<PackageIcon>logo.png</PackageIcon>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/nsnail/NSExt.git</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageTags>extensions</PackageTags>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<RootNamespace>NSExt</RootNamespace>
<SignAssembly>true</SignAssembly>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
<Import Project="$(SolutionDir)/build/code.quality.props"/>
<Import Project="$(SolutionDir)/build/nuget.package.props"/>
<Import Project="$(SolutionDir)/build/copy.pkg.xml.comment.files.targets"/>
<Import Project="$(SolutionDir)/build/prebuild.targets"/>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0"/>
</ItemGroup>
<ItemGroup>
<None Include="../../../assets/logo.png" Pack="true" PackagePath="/"/>
<None Include="../../../README.md" Pack="true" PackagePath="/"/>
<None Update="*.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>