Skip to content

Commit c2b2e33

Browse files
author
serg.morozov
committed
nuget package
1 parent 973dfd3 commit c2b2e33

File tree

6 files changed

+74
-4
lines changed

6 files changed

+74
-4
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Publish NuGet Package
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Публикация при пуше в ветку main
7+
paths:
8+
- 'NuclearAbilitySystem/**' # Укажите правильный путь к проекту, если он отличается
9+
10+
jobs:
11+
build-and-publish:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v3
17+
18+
- name: Setup .NET SDK
19+
uses: actions/setup-dotnet@v3
20+
with:
21+
dotnet-version: '6.0.x' # Используем .NET 6.0, как указано в .csproj
22+
23+
- name: Restore dependencies
24+
run: dotnet restore NuclearAbilitySystem/NuclearAbilitySystem.csproj
25+
26+
- name: Build
27+
run: dotnet build NuclearAbilitySystem/NuclearAbilitySystem.csproj --configuration Test --no-restore
28+
29+
- name: Test
30+
run: dotnet test NuclearAbilitySystem/NuclearAbilitySystem.csproj --configuration Test --no-build --verbosity normal
31+
32+
- name: Pack NuGet Package (auto-generated on build)
33+
run: dotnet build NuclearAbilitySystem/NuclearAbilitySystem.csproj --configuration Release --no-restore
34+
35+
- name: Publish to NuGet
36+
env:
37+
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
38+
run: dotnet nuget push NuclearAbilitySystem/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json

Documentation/icon.png

149 KB
Loading

NuclearAbilitySystem.Tests/TestUnit.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public TestUnit(string name, int health, int damage, Vector2 position) : base(ne
3838
_features.Add(typeof(IHasPositionCombatFeature), new HasPositionCombatFeature(position));
3939
}
4040

41-
protected TestUnit(TestUnit testUnit) : base(testUnit)
41+
private TestUnit(TestUnit testUnit) : base(testUnit)
4242
{
4343
Name = testUnit.Name;
4444
Health = testUnit.Health;

NuclearAbilitySystem.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,19 @@ Global
1515
GlobalSection(ProjectConfigurationPlatforms) = postSolution
1616
{D2FDA127-F4DF-4F66-B0AC-4ADF69048F77}.Test|Any CPU.ActiveCfg = Test|Any CPU
1717
{D2FDA127-F4DF-4F66-B0AC-4ADF69048F77}.Test|Any CPU.Build.0 = Test|Any CPU
18+
{D2FDA127-F4DF-4F66-B0AC-4ADF69048F77}.Release|Any CPU.ActiveCfg = Release|Any CPU
19+
{D2FDA127-F4DF-4F66-B0AC-4ADF69048F77}.Release|Any CPU.Build.0 = Release|Any CPU
1820
{87453710-0599-454C-9D96-1E6940BE45F4}.Test|Any CPU.ActiveCfg = Test|Any CPU
1921
{87453710-0599-454C-9D96-1E6940BE45F4}.Test|Any CPU.Build.0 = Test|Any CPU
22+
{87453710-0599-454C-9D96-1E6940BE45F4}.Release|Any CPU.ActiveCfg = Release|Any CPU
23+
{87453710-0599-454C-9D96-1E6940BE45F4}.Release|Any CPU.Build.0 = Release|Any CPU
2024
{4362CE91-804D-4A40-A40B-A0656995E8F0}.Test|Any CPU.ActiveCfg = Debug|Any CPU
2125
{4362CE91-804D-4A40-A40B-A0656995E8F0}.Test|Any CPU.Build.0 = Debug|Any CPU
26+
{4362CE91-804D-4A40-A40B-A0656995E8F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
27+
{4362CE91-804D-4A40-A40B-A0656995E8F0}.Release|Any CPU.Build.0 = Release|Any CPU
2228
EndGlobalSection
2329
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2430
Test|Any CPU = Test|Any CPU
31+
Release|Any CPU = Release|Any CPU
2532
EndGlobalSection
2633
EndGlobal

NuclearAbilitySystem/NuclearAbilitySystem.csproj

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,29 @@
77
<Nullable>enable</Nullable>
88
<Configurations>Debug;Release;Test</Configurations>
99
<Platforms>AnyCPU</Platforms>
10-
<RootNamespace>AbilitySystem.Execution</RootNamespace>
10+
<RootNamespace></RootNamespace>
1111
<IsPackable>true</IsPackable>
1212
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1313
<Version>0.1.0</Version>
1414
<Title>NuclearAbilitySystem</Title>
15-
<Authors>Tr0sT</Authors>
15+
<Authors>NuclearBand</Authors>
1616
<Description>A flexible ability system that allows creating, configuring, and executing abilities in games</Description>
17-
<Copyright>Copyright (c) Tr0sT</Copyright>
17+
<Copyright>Copyright (c) NuclearBand 2025</Copyright>
1818
<PackageProjectUrl>https://github.com/NuclearBand/NuclearAbilitySystem</PackageProjectUrl>
1919
<PackageLicenseUrl>https://github.com/NuclearBand/NuclearAbilitySystem/blob/main/LICENSE</PackageLicenseUrl>
2020
<RepositoryUrl>https://github.com/NuclearBand/NuclearAbilitySystem</RepositoryUrl>
2121
<PackageTags>gamedev, ability, skill, perk, rpg, modifier, damage, buff, debuff</PackageTags>
22+
<PackageIcon>icon.png</PackageIcon>
23+
<RepositoryType>git</RepositoryType>
24+
<PackageId>NuclearAbilitySystem</PackageId>
25+
</PropertyGroup>
26+
27+
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
28+
<Optimize>true</Optimize>
29+
<DefineConstants>TRACE</DefineConstants>
30+
<DebugType>none</DebugType>
31+
<PlatformTarget>AnyCPU</PlatformTarget>
32+
<OutputPath>bin\Release\</OutputPath>
2233
</PropertyGroup>
2334

2435
<ItemGroup>
@@ -27,4 +38,12 @@
2738
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
2839
</ItemGroup>
2940

41+
<ItemGroup>
42+
<None Include="..\Documentation\icon.png">
43+
<Pack>True</Pack>
44+
<PackagePath></PackagePath>
45+
<Link>icon.png</Link>
46+
</None>
47+
</ItemGroup>
48+
3049
</Project>

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1+
<p align="center">
2+
<img src="Documentation/icon.png"/>
3+
</p>
4+
15
# Nuclear Ability System
26

7+
[![Nuget](https://img.shields.io/nuget/v/NuclearAbilitySystem)](https://www.nuget.org/packages/NuclearAbilitySystem/)
8+
39
A flexible ability system that allows creating, configuring, and executing abilities in games
410

511
Can be used in Unity 2020.1.4 or later (C# 8)

0 commit comments

Comments
 (0)