Skip to content

Commit 5429629

Browse files
authored
chore(CI): improve package metadata and validate it (riok#156)
1 parent dde20fc commit 5429629

5 files changed

Lines changed: 29 additions & 2 deletions

File tree

.github/workflows/test.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,12 @@ jobs:
1717
- run: dotnet format --no-restore --verify-no-changes
1818
- run: dotnet test --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
1919
- uses: codecov/codecov-action@v3
20+
package:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v3
24+
- uses: actions/setup-dotnet@v3.0.1
25+
- run: dotnet tool restore
26+
- run: dotnet pack -c Release
27+
- run: dotnet meziantou.validate-nuget-package ./src/Riok.Mapperly/bin/Release/*.nupkg
28+
- run: dotnet validate package local ./src/Riok.Mapperly/bin/Release/*.nupkg

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<Nullable>enable</Nullable>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Version>0.0.1-dev</Version>
7+
<Authors>Mapperly Contributors, Lars Tönz, Manuel Allenspach</Authors>
78
</PropertyGroup>
89

910
</Project>

dotnet-tools.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,18 @@
1313
"commands": [
1414
"xmldoc2md"
1515
]
16+
},
17+
"dotnet-validate": {
18+
"version": "0.0.1-preview.304",
19+
"commands": [
20+
"dotnet-validate"
21+
]
22+
},
23+
"meziantou.framework.nugetpackagevalidation.tool": {
24+
"version": "1.0.8",
25+
"commands": [
26+
"meziantou.validate-nuget-package"
27+
]
1628
}
1729
}
1830
}

src/Directory.Build.props

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
<PropertyGroup>
66
<TargetFramework>netstandard2.0</TargetFramework>
7+
<DebugType>embedded</DebugType>
8+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
9+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
710

811
<!--
912
we use a higher version than supported by the target framework to have nullable types and other nice features

src/Riok.Mapperly/Riok.Mapperly.csproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4+
<EnablePackageValidation>true</EnablePackageValidation>
45
<IncludeBuildOutput>false</IncludeBuildOutput>
56
<PackageReadmeFile>README.md</PackageReadmeFile>
67
<PublishRepositoryUrl>true</PublishRepositoryUrl>
78
<PackageProjectUrl>https://riok.github.io/mapperly</PackageProjectUrl>
89
<PackageId>Riok.Mapperly</PackageId>
9-
<PackageLicense>Apache-2.0</PackageLicense>
10+
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
1011
<PackageDescription>
1112
A .NET source generator for generating object mappings.
1213
No runtime reflection.
@@ -28,10 +29,11 @@
2829
<!-- This ensures the library will be packaged as a source generator when we use `dotnet pack` -->
2930
<ItemGroup>
3031
<None Include="../../README.md" Pack="true" PackagePath="\" />
31-
<None Include="../../docs/static/img/logo.png" Pack="true" PackagePath="" />
32+
<None Include="../../docs/static/img/logo.png" Pack="true" PackagePath="\" />
3233
<None Include="$(OutputPath)\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
3334
<None Include="$(OutputPath)\$(AssemblyName).Abstractions.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
3435
<None Include="$(OutputPath)\$(AssemblyName).Abstractions.dll" Pack="true" PackagePath="lib\netstandard2.0" Visible="true" />
36+
<None Include="$(OutputPath)\$(AssemblyName).Abstractions.xml" Pack="true" PackagePath="lib\netstandard2.0" Visible="true" />
3537
</ItemGroup>
3638

3739
</Project>

0 commit comments

Comments
 (0)