Skip to content

Commit 5b5666f

Browse files
randleeclaude
andcommitted
refactor: Configure single NuGet package for CLI tool
Adjust NuGet publishing to create a single package (roslyn-diff) that bundles all assemblies. Core and Output projects are no longer packaged separately as they are automatically included via project references. Changes: - Set PackageId to 'roslyn-diff' in CLI project - Mark Core and Output projects as IsPackable=false - Update publish workflow to pack only CLI project - Remove unnecessary NuGet metadata from library projects Users can now install via: dotnet tool install roslyn-diff Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 77f789e commit 5b5666f

File tree

4 files changed

+8
-22
lines changed

4 files changed

+8
-22
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
run: dotnet test -c Release --no-build
3636

3737
- name: Pack
38-
run: dotnet pack -c Release --no-build -p:Version=${{ steps.version.outputs.VERSION }} -o ./packages
38+
run: dotnet pack src/RoslynDiff.Cli/RoslynDiff.Cli.csproj -c Release --no-build -p:Version=${{ steps.version.outputs.VERSION }} -o ./packages
3939

4040
- name: Publish to GitHub Packages
4141
run: dotnet nuget push ./packages/*.nupkg --source "https://nuget.pkg.github.com/randlee/index.json" --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate

src/RoslynDiff.Cli/RoslynDiff.Cli.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
<!-- NuGet Package Metadata (common properties inherited from Directory.Build.props) -->
99
<PropertyGroup>
10-
<PackageId>RoslynDiff</PackageId>
11-
<Description>A semantic diff tool for .NET source code using Roslyn. Unlike traditional line-by-line diff tools, roslyn-diff understands code structure, detecting and reporting changes at the semantic level (classes, methods, properties, etc.).</Description>
12-
<PackageTags>roslyn;diff;semantic-diff;code-analysis;csharp;vb;dotnet;cli;tool</PackageTags>
10+
<PackageId>roslyn-diff</PackageId>
11+
<Description>Roslyn-based semantic diff tool for C# and VB.NET code comparison</Description>
12+
<PackageTags>diff;roslyn;csharp;vbnet;code-comparison;cli</PackageTags>
1313
<PackageReadmeFile>README.md</PackageReadmeFile>
1414
<PackageIcon>icon.png</PackageIcon>
1515
<PackageReleaseNotes>Initial release of roslyn-diff with semantic diff capabilities for C# and VB.NET files.</PackageReleaseNotes>
Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3+
<!-- This project is NOT packaged separately - it's bundled into the CLI tool package -->
34
<PropertyGroup>
4-
<PackageId>RoslynDiff.Core</PackageId>
5-
<Description>Core library for Roslyn-based semantic code diffing. Provides semantic diff capabilities for C# and VB.NET source code.</Description>
6-
<PackageTags>diff;roslyn;csharp;vbnet;code-comparison;semantic-diff</PackageTags>
7-
<PackageReadmeFile>README.md</PackageReadmeFile>
5+
<IsPackable>false</IsPackable>
86
</PropertyGroup>
97

108
<ItemGroup>
@@ -15,9 +13,4 @@
1513
<PackageReference Include="DiffPlex" Version="1.7.2" />
1614
</ItemGroup>
1715

18-
<!-- Include README in Package -->
19-
<ItemGroup>
20-
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
21-
</ItemGroup>
22-
2316
</Project>
Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3+
<!-- This project is NOT packaged separately - it's bundled into the CLI tool package -->
34
<PropertyGroup>
4-
<PackageId>RoslynDiff.Output</PackageId>
5-
<Description>Output formatters and renderers for RoslynDiff results. Supports JSON, HTML, text, and terminal output formats.</Description>
6-
<PackageTags>diff;roslyn;csharp;vbnet;code-comparison;output-formatter</PackageTags>
7-
<PackageReadmeFile>README.md</PackageReadmeFile>
5+
<IsPackable>false</IsPackable>
86
</PropertyGroup>
97

108
<ItemGroup>
@@ -15,11 +13,6 @@
1513
<PackageReference Include="Spectre.Console" Version="0.49.1" />
1614
</ItemGroup>
1715

18-
<!-- Include README in Package -->
19-
<ItemGroup>
20-
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
21-
</ItemGroup>
22-
2316
<!-- System.Text.Json is included in .NET 10.0 runtime -->
2417

2518
</Project>

0 commit comments

Comments
 (0)