From 7637ec43735d54571944ab90619f0040c8f23395 Mon Sep 17 00:00:00 2001 From: ChiaraBm Date: Fri, 13 Mar 2026 09:01:45 +0100 Subject: [PATCH] Fixed type in razor component. Updated action file with refactored version for better readability --- .gitea/workflows/publish-nuget.yml | 86 ++++++++++++------------ Moonlight.Frontend/Admin/Sys/Index.razor | 2 +- 2 files changed, 45 insertions(+), 43 deletions(-) diff --git a/.gitea/workflows/publish-nuget.yml b/.gitea/workflows/publish-nuget.yml index f17f5cfb..71e3375f 100644 --- a/.gitea/workflows/publish-nuget.yml +++ b/.gitea/workflows/publish-nuget.yml @@ -8,59 +8,61 @@ on: paths: - 'Moonlight.*/*.csproj' +env: + NUGET_SOURCE: https://git.battlestati.one/api/packages/Moonlight-Panel/nuget/index.json + NUGET_PUBLIC: https://api.nuget.org/v3/index.json + CONFIGURATION: Debug + jobs: publish: - name: Publish Dev Packages - + name: Publish ${{ matrix.project }} runs-on: linux_amd64 - + + strategy: + matrix: + project: + - Moonlight.Api + - Moonlight.Shared + - Moonlight.Frontend + steps: - name: Check out repository code uses: actions/checkout@v4 - - # Publish api server - - name: Build project - run: dotnet build Moonlight.Api --configuration Debug - - name: Publish NuGet package - run: dotnet pack Moonlight.Api --configuration Debug --output ./artifacts + - name: Restore NuGet packages + run: > + dotnet restore ${{ matrix.project }} + --source ${{ env.NUGET_PUBLIC }} + --source ${{ env.NUGET_SOURCE }} - - name: Push nuget package - run: dotnet nuget push ./artifacts/*.nupkg --skip-duplicate --source https://git.battlestati.one/api/packages/Moonlight-Panel/nuget/index.json --api-key ${{ secrets.ACCESS_TOKEN }} - - - name: Remove artifacts - run: rm -rf ./artifacts - - # Publish frontend - # We need to build it first so the class list files generate - - name: Build project - run: dotnet build Hosts/Moonlight.Frontend.Host --configuration Debug - - - name: Build tailwind styles and extract class list + # Frontend requires a host build + Tailwind compilation first + - name: Build frontend host (Frontend only) + if: matrix.project == 'Moonlight.Frontend' + run: > + dotnet build Hosts/Moonlight.Frontend.Host + --configuration ${{ env.CONFIGURATION }} + + - name: Build Tailwind styles (Frontend only) + if: matrix.project == 'Moonlight.Frontend' working-directory: Hosts/Moonlight.Frontend.Host/Styles run: npm install && npm run build - name: Build project - run: dotnet build Moonlight.Frontend --configuration Debug + run: > + dotnet build ${{ matrix.project }} + --configuration ${{ env.CONFIGURATION }} + --no-restore - - name: Publish NuGet package - run: dotnet pack Moonlight.Frontend --configuration Debug --output ./artifacts + - name: Pack NuGet package + run: > + dotnet pack ${{ matrix.project }} + --configuration ${{ env.CONFIGURATION }} + --output ./artifacts + --no-build - - name: Push nuget package - run: dotnet nuget push ./artifacts/*.nupkg --skip-duplicate --source https://git.battlestati.one/api/packages/Moonlight-Panel/nuget/index.json --api-key ${{ secrets.ACCESS_TOKEN }} - - - name: Remove artifacts - run: rm -rf ./artifacts - - # Publish shared - - name: Build project - run: dotnet build Moonlight.Shared --configuration Debug - - - name: Publish NuGet package - run: dotnet pack Moonlight.Shared --configuration Debug --output ./artifacts - - - name: Push nuget package - run: dotnet nuget push ./artifacts/*.nupkg --skip-duplicate --source https://git.battlestati.one/api/packages/Moonlight-Panel/nuget/index.json --api-key ${{ secrets.ACCESS_TOKEN }} - - - name: Remove artifacts - run: rm -rf ./artifacts \ No newline at end of file + - name: Push NuGet package + run: > + dotnet nuget push ./artifacts/*.nupkg + --skip-duplicate + --source ${{ env.NUGET_SOURCE }} + --api-key ${{ secrets.ACCESS_TOKEN }} \ No newline at end of file diff --git a/Moonlight.Frontend/Admin/Sys/Index.razor b/Moonlight.Frontend/Admin/Sys/Index.razor index 86da0918..79764cda 100644 --- a/Moonlight.Frontend/Admin/Sys/Index.razor +++ b/Moonlight.Frontend/Admin/Sys/Index.razor @@ -34,7 +34,7 @@ @if (SettingsResult.Succeeded) { - < + } @if (DiagnoseResult.Succeeded)