8 Commits

Author SHA1 Message Date
omegaleo d9289d8eb2 Merge remote-tracking branch 'origin/main' 2026-01-28 14:25:03 +00:00
omegaleo b39763c104 fixed issue building for IIS 2026-01-28 14:24:58 +00:00
omegaleo 1a4eb80696 Add GitHub Actions workflow for GitHub Pages deployment
This workflow automates the deployment of static content to GitHub Pages upon pushes to the main branch or manual triggers.
2026-01-28 14:14:56 +00:00
omegaleo 0e4819a5a2 Merge remote-tracking branch 'origin/main' 2026-01-28 14:09:58 +00:00
omegaleo 7d3729db01 Added version to Changelog project 2026-01-28 14:09:53 +00:00
omegaleo a53e669bc1 chore: update changelog and version to v1.2.1 2026-01-28 14:07:57 +00:00
omegaleo 73a3c3cbe5 Merge remote-tracking branch 'origin/main' 2026-01-28 14:07:03 +00:00
omegaleo 56f4c88f4b Added shared library to published packages and fixed workflows 2026-01-28 14:06:57 +00:00
15 changed files with 173 additions and 12 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
+43
View File
@@ -0,0 +1,43 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
@@ -4,6 +4,7 @@
<TargetFramework>netstandard2.1</TargetFramework> <TargetFramework>netstandard2.1</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings> <ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<Version>1.2.1</Version>
<Title>Omega Leo's Helper Library - Changelog</Title> <Title>Omega Leo's Helper Library - Changelog</Title>
<Authors>Nuno "Omega Leo" Diogo</Authors> <Authors>Nuno "Omega Leo" Diogo</Authors>
<Description>Package to help with Changelog generation</Description> <Description>Package to help with Changelog generation</Description>
@@ -18,10 +19,10 @@
<ItemGroup> <ItemGroup>
<None Include="README.md" Pack="true" PackagePath="\"> <None Include="README.md" Pack="true" PackagePath="\">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Never</CopyToOutputDirectory>
</None> </None>
<None Include="CHANGELOG.md" Pack="true" PackagePath="\"> <None Include="CHANGELOG.md" Pack="true" PackagePath="\">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Never</CopyToOutputDirectory>
</None> </None>
<None Include="LICENSE.md" Pack="true" PackagePath="\" /> <None Include="LICENSE.md" Pack="true" PackagePath="\" />
</ItemGroup> </ItemGroup>
@@ -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>
@@ -29,10 +29,10 @@
<None Include="README.md" Pack="true" PackagePath="\" /> <None Include="README.md" Pack="true" PackagePath="\" />
<None Include="CHANGELOG.md" Pack="true" PackagePath="\" /> <None Include="CHANGELOG.md" Pack="true" PackagePath="\" />
<None Update="README.md"> <None Update="README.md">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Never</CopyToOutputDirectory>
</None> </None>
<None Update="CHANGELOG.md"> <None Update="CHANGELOG.md">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Never</CopyToOutputDirectory>
</None> </None>
</ItemGroup> </ItemGroup>
@@ -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>
@@ -24,10 +24,10 @@
<ItemGroup> <ItemGroup>
<None Update="README.md"> <None Update="README.md">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Never</CopyToOutputDirectory>
</None> </None>
<None Update="CHANGELOG.md"> <None Update="CHANGELOG.md">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Never</CopyToOutputDirectory>
</None> </None>
</ItemGroup> </ItemGroup>
@@ -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>Never</CopyToOutputDirectory>
</None>
<None Include="CHANGELOG.md" Pack="true" PackagePath="\">
<CopyToOutputDirectory>Never</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">
+3 -3
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>
@@ -19,10 +19,10 @@
<ItemGroup> <ItemGroup>
<None Include="README.md" Pack="true" PackagePath="\"> <None Include="README.md" Pack="true" PackagePath="\">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Never</CopyToOutputDirectory>
</None> </None>
<None Include="CHANGELOG.md" Pack="true" PackagePath="\"> <None Include="CHANGELOG.md" Pack="true" PackagePath="\">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Never</CopyToOutputDirectory>
</None> </None>
<None Include="LICENSE.md" Pack="true" PackagePath="\"/> <None Include="LICENSE.md" Pack="true" PackagePath="\"/>
</ItemGroup> </ItemGroup>