build workflow and spacing cleanup
Some checks failed
Build / Compute Version (push) Successful in 5s
Build / Build Nuget package (push) Failing after 6s

This commit is contained in:
2025-05-11 16:37:46 -04:00
parent 7987664c11
commit e475c32843
5 changed files with 128 additions and 82 deletions

44
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,44 @@
name: Build
on:
push:
branches: [master]
jobs:
compute-version:
name: Compute Version
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- uses: actions/checkout@master
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- id: version
uses: paulhatch/semantic-version@v5.3.0
with:
tag_prefix: ''
major_pattern: 'Add project files'
minor_pattern: 'feature:'
bump_each_commit: true
enable_prerelease_mode: false
build-nuget:
name: Build Nuget package
runs-on: ubuntu-latest
needs: [compute-version]
steps:
- uses: actions/checkout@master
- uses: actions/setup-dotnet@v4
- run: dotnet restore ./ --locked-mode
name: Restore Project
- run: dotnet pack -c Release -o ./pub ./ --no-restore -p:Version="${{ needs.compute-version.outputs.version }}"
name: Pack Project
- name: Push Project
run: dotnet nuget push -s https://ng.zznty.ru/v3/index.json -k ${{ secrets.NUGET_API_KEY }} ./pub/*.nupkg

1
.gitignore vendored
View File

@@ -3,3 +3,4 @@ obj/
/packages/
riderModule.iml
/_ReSharper.Caches/
.vs/

View File

@@ -97,17 +97,18 @@ public class ModListComponent : IRenderComponent
TextDisabled("Loading...");
return;
case { IsCompletedSuccessfully: false }:
{
TextDisabled("Failed to load plugins list");
if (_searchTask.Exception is null) return;
foreach (var exception in _searchTask.Exception.InnerExceptions)
{
TextWrapped($"{exception.GetType()}: {exception.Message}");
}
TextDisabled("Failed to load plugins list");
if (_searchTask.Exception is null)
return;
return;
}
foreach (var exception in _searchTask.Exception.InnerExceptions)
{
TextWrapped($"{exception.GetType()}: {exception.Message}");
}
return;
}
}
if (_modList.Count == 0)
@@ -158,68 +159,68 @@ public class ModListComponent : IRenderComponent
SameLine();
BeginGroup();
BeginGroup();
BeginChild("Mod View", new(0, -GetFrameHeightWithSpacing())); // Leave room for 1 line below us
BeginChild("Mod View", new(0, -GetFrameHeightWithSpacing())); // Leave room for 1 line below us
if (_selected is not null)
{
Text(_selected.Name);
Separator();
if (BeginTabBar("##ModViewTabs"))
if (_selected is not null)
{
if (!string.IsNullOrEmpty(_selected.Description) && BeginTabItem("Description"))
Text(_selected.Name);
Separator();
if (BeginTabBar("##ModViewTabs"))
{
TextWrapped(_selected.Description);
EndTabItem();
if (!string.IsNullOrEmpty(_selected.Description) && BeginTabItem("Description"))
{
TextWrapped(_selected.Description);
EndTabItem();
}
if (BeginTabItem("Mod Description"))
{
TextWrapped(string.IsNullOrEmpty(_selected.ModDescription) ? "Nothing." : _selected.ModDescription);
EndTabItem();
}
if (BeginTabItem("Details"))
{
TextLinkOpenURL("Mod URL", _selected.Url);
Text("Author:");
SameLine();
TextWrapped(_selected.Author);
Text("Created:");
SameLine();
TextWrapped(DateTimeOffset.FromUnixTimeSeconds(_selected.Created).ToString("g"));
Text("Updated:");
SameLine();
TextWrapped(DateTimeOffset.FromUnixTimeSeconds(_selected.Updated).ToString("g"));
EndTabItem();
}
EndTabBar();
}
if (BeginTabItem("Mod Description"))
{
TextWrapped(string.IsNullOrEmpty(_selected.ModDescription) ? "Nothing." : _selected.ModDescription);
EndTabItem();
}
if (BeginTabItem("Details"))
{
TextLinkOpenURL("Mod URL", _selected.Url);
Text("Author:");
SameLine();
TextWrapped(_selected.Author);
Text("Created:");
SameLine();
TextWrapped(DateTimeOffset.FromUnixTimeSeconds(_selected.Created).ToString("g"));
Text("Updated:");
SameLine();
TextWrapped(DateTimeOffset.FromUnixTimeSeconds(_selected.Updated).ToString("g"));
EndTabItem();
}
EndTabBar();
}
}
EndChild();
EndChild();
if (_selected is not null)
{
var installed = Installed.Contains(_selected.Id);
if (Button(installed ? "Uninstall" : "Install"))
if (_selected is not null)
{
if (installed)
Installed.Remove(_selected.Id);
else
Installed.Add(_selected.Id);
var installed = Installed.Contains(_selected.Id);
if (Button(installed ? "Uninstall" : "Install"))
{
if (installed)
Installed.Remove(_selected.Id);
else
Installed.Add(_selected.Id);
Save();
Save();
}
}
}
EndGroup();
EndGroup();
}
finally
{