Skip to content

Commit

Permalink
Update NuGet Information
Browse files Browse the repository at this point in the history
  • Loading branch information
Xilophor committed Mar 9, 2024
1 parent 2b8a21d commit 1c83e4b
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 22 deletions.
80 changes: 58 additions & 22 deletions StaticNetcodeLib/StaticNetcodeLib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@
<Product>StaticNetcodeLib</Product>
</PropertyGroup>

<!-- NuGet Package Info -->
<PropertyGroup>
<PackageId>Xilophor.StaticNetcodeLib</PackageId>
<Title>StaticNetcodeLib</Title>
<Authors>xilophor</Authors>
<PackageTags>bepinex; multiplayer; netcode; network; unity</PackageTags>

<PackageIcon>icon_128x128.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseExpression>LGPL-3.0-or-later</PackageLicenseExpression>

<PackageProjectUrl>https://github.com/Xilophor/StaticNetcodeLib</PackageProjectUrl>
<RepositoryUrl>https://github.com/Xilophor/StaticNetcodeLib</RepositoryUrl>
<RepositoryType>git</RepositoryType>
</PropertyGroup>

<!-- Set Mod Version with MinVer -->
<Target Name="SetModVersion" BeforeTargets="AddGeneratedFile" DependsOnTargets="MinVer">
<PropertyGroup>
Expand Down Expand Up @@ -67,26 +83,46 @@
<PackageReference Include="MinVer" Version="4.*" PrivateAssets="all"/>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework.TrimEnd(`0123456789`))' == 'net'">
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="all"/>
</ItemGroup>

<ItemGroup Condition="$(CI) != 'true'">
<Reference Include="Assembly-CSharp" Publicize="true" PrivateAssets="all">
<HintPath>$(DependenciesDirectory)\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="Unity.Netcode.Runtime" Publicize="true" PrivateAssets="all">
<HintPath>$(DependenciesDirectory)\Unity.Netcode.Runtime.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup Condition="$(CI) == 'true'">
<PackageReference Include="LethalCompany.GameLibs.Steam" Version="*-*" Publicize="true" PrivateAssets="all"/>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1'">
<Reference Include="OdinSerializer" PrivateAssets="all">
<HintPath>$(ProjectDir)../libs/odin-serializer/OdinSerializer.dll</HintPath>
</Reference>
</ItemGroup>
<!-- NuGet Include README & Icon -->
<ItemGroup>
<None Include="$(ProjectDir)../README.md" Pack="true" PackagePath="/" />
<None Include="$(ProjectDir)../assets/icon_128x128.png" Pack="true" PackagePath="/" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework.TrimEnd(`0123456789`))' == 'net'">
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="all"/>
</ItemGroup>

<ItemGroup Condition="$(CI) != 'true'">
<Reference Include="Assembly-CSharp" Publicize="true" PrivateAssets="all">
<HintPath>$(DependenciesDirectory)\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="Unity.Netcode.Runtime" Publicize="true" PrivateAssets="all">
<HintPath>$(DependenciesDirectory)\Unity.Netcode.Runtime.dll</HintPath>
</Reference>
</ItemGroup>

<ItemGroup Condition="$(CI) == 'true'">
<PackageReference Include="LethalCompany.GameLibs.Steam" Version="*-*" Publicize="true" PrivateAssets="all"/>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1'">
<Reference Include="OdinSerializer" PrivateAssets="all">
<HintPath>$(ProjectDir)../libs/odin-serializer/OdinSerializer.dll</HintPath>
</Reference>
</ItemGroup>

<!-- Pack for Thunderstore -->
<Target
Name="ThunderstorePack"
AfterTargets="PostBuildEvent"
Condition="$(TargetFramework) == 'netstandard2.1' and $(Configuration) == 'Release' and $(CI) == 'true'"
DependsOnTargets="SetPluginVersion"
>
<Exec Command="dotnet tcli build --config-path $(ProjectDir)../assets/thunderstore.toml --package-version $(PlainVersion)" />
<ItemGroup>
<FilesToRename Include="$(ProjectDir)../dist/*-$(PlainVersion).zip" />
</ItemGroup>
<Move SourceFiles="@(FilesToRename)" DestinationFiles="@(FilesToRename -&gt; Replace($(PlainVersion), $(MinVerVersion)))" />
</Target>
</Project>
Binary file modified assets/icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icon_128x128.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1c83e4b

Please sign in to comment.