Skip to content

Commit f4f19e1

Browse files
committed
Use .NET SDK to create NuGet package
1 parent f7b5dbb commit f4f19e1

File tree

5 files changed

+37
-23
lines changed

5 files changed

+37
-23
lines changed

.github/workflows/ci.yml

+4-9
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
package:
6868
name: Create package
6969
needs: build
70-
runs-on: windows-2019
70+
runs-on: ubuntu-24.04
7171
env:
7272
DOTNET_NOLOGO: true
7373
steps:
@@ -78,20 +78,15 @@ jobs:
7878
- name: Setup .NET SDK
7979
uses: actions/[email protected]
8080
with:
81-
dotnet-version: 8.0.x
82-
- name: Install MinVer
83-
run: dotnet tool install --global minver-cli
84-
- name: Run MinVer
85-
id: minver
86-
run: echo "version=$(minver)" >> $env:GITHUB_OUTPUT
81+
dotnet-version: 9.0.x
8782
- name: Download artifacts
8883
uses: actions/[email protected]
8984
with:
9085
path: nuget.package/runtimes/
9186
- name: Create package
92-
run: ./nuget.exe Pack nuget.package/NativeBinaries.nuspec -Version ${{ steps.minver.outputs.version }} -NoPackageAnalysis
87+
run: dotnet pack nuget.package
9388
- name: Upload NuGet package
9489
uses: actions/[email protected]
9590
with:
9691
name: NuGet package
97-
path: ./*.nupkg
92+
path: ./nuget.package/*.nupkg

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@
44
*.dylib
55
*.so
66
*.zip
7+
8+
bin/
9+
obj/
10+
.vs/

nuget.exe

-8.06 MB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netstandard2.0</TargetFramework>
5+
<NoBuild>true</NoBuild>
6+
<IncludeBuildOutput>false</IncludeBuildOutput>
7+
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
8+
<Authors>LibGit2Sharp contributors</Authors>
9+
<PackageLicenseFile>libgit2\libgit2.license.txt</PackageLicenseFile>
10+
<PackageProjectUrl>https://github.com/libgit2/libgit2sharp.nativebinaries</PackageProjectUrl>
11+
<PackageIcon>libgit2\libgit2.png</PackageIcon>
12+
<Description>Native binaries for LibGit2Sharp</Description>
13+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
14+
<PackageOutputPath>$(MSBuildThisFileDirectory)</PackageOutputPath>
15+
<NoWarn>$(NoWarn);NU5127</NoWarn>
16+
</PropertyGroup>
17+
18+
<ItemGroup>
19+
<PackageReference Include="MinVer" Version="6.0.0" PrivateAssets="all" />
20+
</ItemGroup>
21+
22+
<ItemGroup>
23+
<None Update="build\**\*" Pack="true" PackagePath="" />
24+
<None Update="buildMultiTargeting\**\*" Pack="true" PackagePath="" />
25+
<None Update="libgit2\**\*" Pack="true" PackagePath="" />
26+
<None Update="runtimes\**\*" Pack="true" PackagePath="" />
27+
</ItemGroup>
28+
29+
</Project>

nuget.package/NativeBinaries.nuspec

-14
This file was deleted.

0 commit comments

Comments
 (0)