Skip to content

Commit 2e27c35

Browse files
authored
Merge pull request #10 from sharpninja/copilot/package-bitnetsharp-tools
Package BitNetSharp.App as a .NET tool and BitNetSharp.Core as a NuGet artifact in CI
2 parents 186863e + 3f1ef10 commit 2e27c35

File tree

4 files changed

+29
-0
lines changed

4 files changed

+29
-0
lines changed

.github/workflows/build.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,23 @@ jobs:
3030

3131
- name: Test
3232
run: dotnet test BitNet-b1.58-Sharp.slnx --configuration Release --no-build --no-restore
33+
34+
- name: Pack BitNetSharp.Core
35+
run: dotnet pack "${{ github.workspace }}/src/BitNetSharp.Core/BitNetSharp.Core.csproj" --configuration Release --no-build --no-restore -p:VersionSuffix=ci.${{ github.run_number }} --output "${{ github.workspace }}/artifacts/packages/core"
36+
37+
- name: Pack BitNetSharp.App dotnet tool
38+
run: dotnet pack "${{ github.workspace }}/src/BitNetSharp.App/BitNetSharp.App.csproj" --configuration Release --no-build --no-restore -p:VersionSuffix=ci.${{ github.run_number }} --output "${{ github.workspace }}/artifacts/packages/tool"
39+
40+
- name: Upload BitNetSharp.Core package
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: BitNetSharp.Core-nuget
44+
path: ${{ github.workspace }}/artifacts/packages/core/*.nupkg
45+
if-no-files-found: error
46+
47+
- name: Upload BitNetSharp.App tool package
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: BitNetSharp.App-dotnet-tool
51+
path: ${{ github.workspace }}/artifacts/packages/tool/*.nupkg
52+
if-no-files-found: error

Directory.Build.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<Project>
2+
<PropertyGroup>
3+
<VersionPrefix>0.1.0</VersionPrefix>
4+
</PropertyGroup>
5+
</Project>

src/BitNetSharp.App/BitNetSharp.App.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
<TargetFramework>net10.0</TargetFramework>
1515
<ImplicitUsings>enable</ImplicitUsings>
1616
<Nullable>enable</Nullable>
17+
<PackAsTool>true</PackAsTool>
18+
<ToolCommandName>bitnetsharp</ToolCommandName>
1719
</PropertyGroup>
1820

1921
</Project>

src/BitNetSharp.Core/BitNetSharp.Core.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
<TargetFramework>net10.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
7+
<PackageId>BitNetSharp.Core</PackageId>
8+
<Description>Paper-aligned BitNet b1.58 transformer runtime for .NET.</Description>
79
</PropertyGroup>
810

911
</Project>

0 commit comments

Comments
 (0)