3 Commits

13 changed files with 121 additions and 4 deletions
+3
View File
@@ -35,6 +35,9 @@ jobs:
- name: Update OmegaLeo.HelperLib.Game Version - name: Update OmegaLeo.HelperLib.Game Version
run: sed -i "s/\(<Version>\)[0-9]\+\.[0-9]\+\.[0-9]\+/\1${{github.event.inputs.tagName}}/" "./OmegaLeo.HelperLib.Game/OmegaLeo.HelperLib.Game.csproj" run: sed -i "s/\(<Version>\)[0-9]\+\.[0-9]\+\.[0-9]\+/\1${{github.event.inputs.tagName}}/" "./OmegaLeo.HelperLib.Game/OmegaLeo.HelperLib.Game.csproj"
- name: Update OmegaLeo.HelperLib.Shared Version
run: sed -i "s/\(<Version>\)[0-9]\+\.[0-9]\+\.[0-9]\+/\1${{github.event.inputs.tagName}}/" "./OmegaLeo.HelperLib.Shared/OmegaLeo.HelperLib.Shared.csproj"
- name: Build Solution - name: Build Solution
run: dotnet build --configuration Release run: dotnet build --configuration Release
+24
View File
@@ -113,3 +113,27 @@ jobs:
asset_path: ./OmegaLeo.HelperLib.Documentation/bin/Release/OmegaLeo.HelperLib.Documentation.${{ github.event.release.tag_name }}.nupkg asset_path: ./OmegaLeo.HelperLib.Documentation/bin/Release/OmegaLeo.HelperLib.Documentation.${{ github.event.release.tag_name }}.nupkg
asset_name: OmegaLeo.HelperLib.Documentation.${{ github.event.release.tag_name }}.nupkg asset_name: OmegaLeo.HelperLib.Documentation.${{ github.event.release.tag_name }}.nupkg
asset_content_type: application/zip asset_content_type: application/zip
publish-shared-lib:
runs-on: ubuntu-latest
needs: [ get-release ]
steps:
- uses: actions/checkout@v2
- name: Setup .Net Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.x'
- name: Update Project Version
run: sed -i "s/\(<Version>\([0-9]\+\.\)\{2\}\)\([0-9]\+\)/\1${{ github.event.release.tag_name }}/" "./OmegaLeo.HelperLib.Shared/OmegaLeo.HelperLib.Shared.csproj"
- name: Create Nuget Package
run: dotnet pack "./OmegaLeo.HelperLib.Shared/OmegaLeo.HelperLib.Shared.csproj" -c Release /p:Version=${{ github.event.release.tag_name }} /p:PackageReleaseNotes="See https://github.com/omegaleo/OmegaLeo.HelperLib/releases/tag/${{ github.event.release.tag_name }}"
- name: Publish Nuget Package
run: dotnet nuget push ./OmegaLeo.HelperLib.Shared/bin/Release/OmegaLeo.HelperLib.Shared.${{ github.event.release.tag_name }}.nupkg --api-key ${{ secrets.nuget_api_key }} --source https://api.nuget.org/v3/index.json --skip-duplicate
- name: Upload assets to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
upload_url: ${{ needs.get-release.outputs.upload_url }}
asset_path: ./OmegaLeo.HelperLib.Shared/bin/Release/OmegaLeo.HelperLib.Shared.${{ github.event.release.tag_name }}.nupkg
asset_name: OmegaLeo.HelperLib.Shared.${{ github.event.release.tag_name }}.nupkg
asset_content_type: application/zip
@@ -17,6 +17,7 @@ var changelogs = new Dictionary<string, Assembly>()
{Path.Join(root, "OmegaLeo.HelperLib", "CHANGELOG.md"), typeof(BenchmarkUtility).Assembly}, {Path.Join(root, "OmegaLeo.HelperLib", "CHANGELOG.md"), typeof(BenchmarkUtility).Assembly},
{Path.Join(root, "OmegaLeo.HelperLib.Game", "CHANGELOG.md"), typeof(OmegaLeo.HelperLib.Game.Models.ConsoleCommand).Assembly}, {Path.Join(root, "OmegaLeo.HelperLib.Game", "CHANGELOG.md"), typeof(OmegaLeo.HelperLib.Game.Models.ConsoleCommand).Assembly},
{Path.Join(root, "OmegaLeo.HelperLib.Documentation", "CHANGELOG.md"), typeof(OmegaLeo.HelperLib.Documentation.Helpers.DocumentationHelperTool).Assembly}, {Path.Join(root, "OmegaLeo.HelperLib.Documentation", "CHANGELOG.md"), typeof(OmegaLeo.HelperLib.Documentation.Helpers.DocumentationHelperTool).Assembly},
{Path.Join(root, "OmegaLeo.HelperLib.Shared", "CHANGELOG.md"), typeof(OmegaLeo.HelperLib.Shared.Attributes.ChangelogAttribute).Assembly},
}; };
foreach (var changelog in changelogs) foreach (var changelog in changelogs)
@@ -4,7 +4,7 @@
<TargetFramework>netstandard2.1</TargetFramework> <TargetFramework>netstandard2.1</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<RootNamespace>OmegaLeo.HelperLib.Documentation</RootNamespace> <RootNamespace>OmegaLeo.HelperLib.Documentation</RootNamespace>
<Version>1.2.0</Version> <Version>1.2.1</Version>
<Title>Omega Leo's Helper Library</Title> <Title>Omega Leo's Helper Library</Title>
<Authors>Nuno "Omega Leo" Diogo</Authors> <Authors>Nuno "Omega Leo" Diogo</Authors>
<PackageReadmeFile>README.md</PackageReadmeFile> <PackageReadmeFile>README.md</PackageReadmeFile>
@@ -4,7 +4,7 @@
<TargetFramework>netstandard2.1</TargetFramework> <TargetFramework>netstandard2.1</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<Title>Omega Leo's Helper Library - Game Logic</Title> <Title>Omega Leo's Helper Library - Game Logic</Title>
<Version>1.2.0</Version> <Version>1.2.1</Version>
<Authors>Nuno "Omega Leo" Diogo</Authors> <Authors>Nuno "Omega Leo" Diogo</Authors>
<PackageProjectUrl>https://github.com/omegaleo/HelperLib</PackageProjectUrl> <PackageProjectUrl>https://github.com/omegaleo/HelperLib</PackageProjectUrl>
<RepositoryUrl>https://github.com/omegaleo/HelperLib</RepositoryUrl> <RepositoryUrl>https://github.com/omegaleo/HelperLib</RepositoryUrl>
@@ -2,8 +2,18 @@ using System;
namespace OmegaLeo.HelperLib.Shared.Attributes namespace OmegaLeo.HelperLib.Shared.Attributes
{ {
[Documentation(nameof(ChangelogAttribute), "Attribute to annotate classes, methods, or properties with changelog information.",
new []
{
"Version - Changelog version",
"Description - Description of what was changed",
"Date - Date of the changes (Optional)"
},
@"```cs
[Changelog(""1.0.0"", ""Created ChangelogAttribute to be used to register changes in the code."")]
public class ChangelogAttribute : Attribute" )]
[Changelog("1.0.0", "Created ChangelogAttribute to be used to register changes in the code.")] [Changelog("1.0.0", "Created ChangelogAttribute to be used to register changes in the code.")]
[Documentation(nameof(ChangelogAttribute), "Attribute to annotate classes, methods, or properties with changelog information.")] [Changelog("1.2.1", "Created documentation for ChangelogAttribute.", "January 28, 2026")]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property, AllowMultiple = true)] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property, AllowMultiple = true)]
public class ChangelogAttribute : Attribute public class ChangelogAttribute : Attribute
{ {
@@ -3,6 +3,30 @@
namespace OmegaLeo.HelperLib.Shared.Attributes namespace OmegaLeo.HelperLib.Shared.Attributes
{ {
[System.AttributeUsage(AttributeTargets.All, AllowMultiple = false)] [System.AttributeUsage(AttributeTargets.All, AllowMultiple = false)]
[Changelog("1.2.1", "Created documentation for DocumentationAttribute.", "January 28, 2026")]
[Documentation("DocumentationAttribute",
"Attribute to annotate classes, methods, or properties with documentation information.",
new string[]
{
"title: The title of the documentation.",
"description: A brief description.",
"args: An array of argument descriptions.",
"codeExample: An optional code example."
},
@"```csharp
[Documentation(
""MyMethod"",
""This method does something important."",
new string[] { ""param1: The first parameter."", ""param2: The second parameter."" },
""MyMethod(param1, param2);""
)]
public void MyMethod(string param1, int param2)
{
// Method implementation
}
```
"
)]
public class DocumentationAttribute : Attribute public class DocumentationAttribute : Attribute
{ {
public string Title; public string Title;
+16
View File
@@ -0,0 +1,16 @@
# Changelog
## Version 1.2.1
### January 28, 2026
**OmegaLeo.HelperLib.Shared.Attributes**
- **ChangelogAttribute**:
- Created documentation for ChangelogAttribute.
- **DocumentationAttribute**:
- Created documentation for DocumentationAttribute.
## Version 1.0.0
**OmegaLeo.HelperLib.Shared.Attributes**
- **ChangelogAttribute**:
- Created ChangelogAttribute to be used to register changes in the code.
@@ -1,8 +1,33 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>OmegaLeo.HelperLib.Shared</RootNamespace>
<Version>1.2.1</Version>
<Title>Omega Leo's Helper Library - Shared Components</Title>
<Authors>Nuno "Omega Leo" Diogo</Authors>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageProjectUrl>https://github.com/omegaleo/HelperLib</PackageProjectUrl>
<RepositoryUrl>https://github.com/omegaleo/HelperLib</RepositoryUrl>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<PackageLicenseExpression>AGPL-3.0-only</PackageLicenseExpression>
<PackageTags>csharp;dotnet;</PackageTags>
<RepositoryType>git</RepositoryType>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework> <TargetFramework>netstandard2.1</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<None Include="README.md" Pack="true" PackagePath="\">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="CHANGELOG.md" Pack="true" PackagePath="\">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project> </Project>
+4
View File
@@ -0,0 +1,4 @@
# Omega Leo's Helper Library - Shared Components
Lightweight utility library for C# projects.
This library contains shared components and utilities that are used by other packages in the Omega Leo's Helper Library suite.
@@ -62,6 +62,13 @@ public class HomeController : Controller
"OmegaLeo.HelperLib.Documentation", "OmegaLeo.HelperLib.Documentation",
true true
), ),
["shared"] = GenerateLibraryDocs(
typeof(OmegaLeo.HelperLib.Shared.Attributes.ChangelogAttribute).Assembly,
Path.Combine(root, "shared", "OmegaLeo.HelperLib.Shared.CHANGELOG.md"),
"Shared Library",
"Library of shared attributes and utilities used across other OmegaLeo.HelperLib packages",
"OmegaLeo.HelperLib.Shared"
),
}; };
_logger.LogInformation("Initialized {Count} libraries", _libraryCache.Count); _logger.LogInformation("Initialized {Count} libraries", _libraryCache.Count);
@@ -36,6 +36,9 @@
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" asp-area="" asp-controller="Home" asp-action="Library" asp-route-id="documentation">Documentation</a> <a class="nav-link" asp-area="" asp-controller="Home" asp-action="Library" asp-route-id="documentation">Documentation</a>
</li> </li>
<li class="nav-item">
<a class="nav-link" asp-area="" asp-controller="Home" asp-action="Library" asp-route-id="shared">Shared Components</a>
</li>
</ul> </ul>
<ul class="navbar-nav ms-auto"> <ul class="navbar-nav ms-auto">
+1 -1
View File
@@ -4,7 +4,7 @@
<TargetFramework>netstandard2.1</TargetFramework> <TargetFramework>netstandard2.1</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<RootNamespace>OmegaLeo.HelperLib</RootNamespace> <RootNamespace>OmegaLeo.HelperLib</RootNamespace>
<Version>1.2.0</Version> <Version>1.2.1</Version>
<Title>Omega Leo's Helper Library</Title> <Title>Omega Leo's Helper Library</Title>
<Authors>Nuno "Omega Leo" Diogo</Authors> <Authors>Nuno "Omega Leo" Diogo</Authors>
<PackageReadmeFile>README.md</PackageReadmeFile> <PackageReadmeFile>README.md</PackageReadmeFile>