Skip to content

Commit 19ecee0

Browse files
committed
Enable nuget package push
1 parent 73da5ba commit 19ecee0

2 files changed

Lines changed: 45 additions & 0 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Publish NuGet package
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*' # Trigger on version tags like v1.2.3
7+
8+
jobs:
9+
build-and-publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
- name: Setup .NET
16+
uses: actions/setup-dotnet@v4
17+
with:
18+
dotnet-version: '8.x'
19+
20+
- name: Restore dependencies
21+
run: dotnet restore
22+
23+
- name: Build
24+
run: dotnet build --configuration Release --no-restore
25+
26+
- name: Pack
27+
run: dotnet pack --configuration Release --no-build --output ./nupkg
28+
29+
- name: Publish to NuGet
30+
run: dotnet nuget push ./nupkg/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json

Box2dNet/Box2dNet.csproj

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,23 @@
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
8+
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
9+
<Title>Box2d v3 for .NET</Title>
10+
<Authors>Thomas Vantroyen</Authors>
11+
<Description>A thin Box2D v3 .NET wrapper that stays true to the original API.</Description>
12+
<PackageProjectUrl>https://github.com/thomasvt/Box2D3Net</PackageProjectUrl>
13+
<PackageReadmeFile>README.md</PackageReadmeFile>
14+
<RepositoryUrl>https://github.com/thomasvt/Box2D3Net</RepositoryUrl>
15+
<Version>3.1.0.0</Version>
816
</PropertyGroup>
917

18+
<ItemGroup>
19+
<None Include="..\README.md">
20+
<Pack>True</Pack>
21+
<PackagePath>\</PackagePath>
22+
</None>
23+
</ItemGroup>
24+
1025
<ItemGroup>
1126
<None Update="box2d.dll">
1227
<CopyToOutputDirectory>Always</CopyToOutputDirectory>

0 commit comments

Comments
 (0)