Skip to content

Commit 534c111

Browse files
authored
Update CI (#160)
* Update macOS runner images * Move if before run * Update workflow actions * Use .NET SDK to create NuGet package * Update Linux runner images * Update macOS runner images
1 parent 50b577d commit 534c111

File tree

5 files changed

+52
-38
lines changed

5 files changed

+52
-38
lines changed

.github/workflows/ci.yml

+19-24
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,26 @@ jobs:
2525
- os: windows-2019
2626
name: win-arm64
2727
param: -arm64
28-
- os: ubuntu-20.04
28+
- os: ubuntu-24.04
2929
name: linux-x64
30-
- os: ubuntu-20.04
30+
- os: ubuntu-24.04
3131
name: linux-musl-x64
32-
- os: ubuntu-20.04
32+
- os: ubuntu-24.04
3333
name: linux-arm64
34-
- os: ubuntu-20.04
34+
- os: ubuntu-24.04
3535
name: linux-musl-arm
36-
- os: ubuntu-20.04
36+
- os: ubuntu-24.04
3737
name: linux-musl-arm64
38-
- os: ubuntu-20.04
38+
- os: ubuntu-24.04
3939
name: linux-arm
40-
- os: macos-11
40+
- os: macos-13
4141
name: osx-x64
42-
- os: macos-11
42+
- os: macos-13
4343
name: osx-arm64
4444
fail-fast: false
4545
steps:
4646
- name: Checkout
47-
uses: actions/checkout@v4.1.2
47+
uses: actions/checkout@v4.2.2
4848
with:
4949
submodules: true
5050
- name: Build Windows
@@ -54,44 +54,39 @@ jobs:
5454
if: runner.os == 'macOS'
5555
run: ./build.libgit2.sh
5656
- name: Setup QEMU
57-
run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
5857
if: matrix.name == 'linux-musl-arm' || matrix.name == 'linux-musl-arm64'
58+
run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
5959
- name: Build Linux
6060
if: runner.os == 'Linux'
6161
run: ./dockerbuild.sh
6262
- name: Upload artifacts
63-
uses: actions/upload-artifact@v4.3.1
63+
uses: actions/upload-artifact@v4.4.3
6464
with:
6565
name: ${{ matrix.name }}
6666
path: nuget.package/runtimes/${{ matrix.name }}
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:
7474
- name: Checkout
75-
uses: actions/checkout@v4.1.2
75+
uses: actions/checkout@v4.2.2
7676
with:
7777
fetch-depth: 0
7878
- name: Setup .NET SDK
79-
uses: actions/setup-dotnet@v4.0.0
79+
uses: actions/setup-dotnet@v4.1.0
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
88-
uses: actions/[email protected].7
83+
uses: actions/[email protected].8
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
94-
uses: actions/upload-artifact@v4.3.1
89+
uses: actions/upload-artifact@v4.4.3
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)