Merge pull request #446 from Moonlight-Panel/v2.1_TwClassExport
Fixed oauth2 controller. Improved tw export. Fixed gh action
This commit is contained in:
27
.github/workflows/publish-dev-packages.yml
vendored
27
.github/workflows/publish-dev-packages.yml
vendored
@@ -6,14 +6,14 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-scrips:
|
build-scripts:
|
||||||
runs-on: debian-12
|
runs-on: debian-12
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clean up Environment
|
- name: Clean up Environment
|
||||||
run: |
|
run: |
|
||||||
rm -rf ./*
|
rm -rf ./*
|
||||||
rm -rf ./.??*
|
rm -rf ./.??*
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
@@ -25,13 +25,13 @@ jobs:
|
|||||||
|
|
||||||
build-moonlight:
|
build-moonlight:
|
||||||
runs-on: debian-12
|
runs-on: debian-12
|
||||||
needs: build-scrips
|
needs: build-scripts
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clean up Environment
|
- name: Clean up Environment
|
||||||
run: |
|
run: |
|
||||||
rm -rf ./*
|
rm -rf ./*
|
||||||
rm -rf ./.??*
|
rm -rf ./.??*
|
||||||
|
|
||||||
- name: Remove nuget source
|
- name: Remove nuget source
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
@@ -39,17 +39,14 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Add nuget source
|
|
||||||
run: dotnet nuget add source -n moonlight-github "https://nuget.pkg.github.com/Moonlight-Panel/index.json" -u Moonlight-Panel -p ${{secrets.GH_PACKAGES_READWRITE}} --store-password-in-clear-text
|
|
||||||
|
|
||||||
- name: Setup Environment
|
|
||||||
run: dotnet tool install dotnet-moonlight -g
|
|
||||||
|
|
||||||
- name: Build and Pack Moonlight
|
- name: Build and Pack Moonlight
|
||||||
run: |
|
run: |
|
||||||
mkdir ./packs
|
mkdir ./packs
|
||||||
export PATH="$PATH:~/.dotnet/tools"
|
dotnet restore
|
||||||
dotnet moonlight pack . ./packs
|
dotnet build
|
||||||
|
dotnet pack -o ./packs -c Debug Moonlight.ApiServer
|
||||||
|
dotnet pack -o ./packs -c Debug Moonlight.Client
|
||||||
|
dotnet pack -o ./packs -c Debug Moonlight.Shared
|
||||||
|
|
||||||
- name: Publish to Github
|
- name: Publish to Github
|
||||||
run: dotnet nuget push "./packs/*.nupkg" --skip-duplicate --api-key ${{secrets.GH_PACKAGES_READWRITE}} --source https://nuget.pkg.github.com/Moonlight-Panel/index.json
|
run: dotnet nuget push "./packs/*.nupkg" --skip-duplicate --api-key ${{secrets.GH_PACKAGES_READWRITE}} --source https://nuget.pkg.github.com/Moonlight-Panel/index.json
|
||||||
|
|||||||
@@ -66,8 +66,6 @@ public partial class OAuth2Controller : Controller
|
|||||||
parameters.Add("RedirectUri", redirectUri);
|
parameters.Add("RedirectUri", redirectUri);
|
||||||
parameters.Add("ResponseType", responseType);
|
parameters.Add("ResponseType", responseType);
|
||||||
});
|
});
|
||||||
|
|
||||||
await Response.WriteAsync(html);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -77,12 +75,10 @@ public partial class OAuth2Controller : Controller
|
|||||||
parameters.Add("RedirectUri", redirectUri);
|
parameters.Add("RedirectUri", redirectUri);
|
||||||
parameters.Add("ResponseType", responseType);
|
parameters.Add("ResponseType", responseType);
|
||||||
});
|
});
|
||||||
|
|
||||||
await Response.WriteAsync(html);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
await Results
|
await Results
|
||||||
.Text(html, "text/html")
|
.Text(html, "text/html", Encoding.UTF8)
|
||||||
.ExecuteAsync(HttpContext);
|
.ExecuteAsync(HttpContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -158,7 +154,7 @@ public partial class OAuth2Controller : Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
await Results
|
await Results
|
||||||
.Text(html, "text/html")
|
.Text(html, "text/html", Encoding.UTF8)
|
||||||
.ExecuteAsync(HttpContext);
|
.ExecuteAsync(HttpContext);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,52 +19,4 @@
|
|||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.5" PrivateAssets="all"/>
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.5" PrivateAssets="all"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<None Update="Styles\exports.css">
|
|
||||||
<Pack>true</Pack>
|
|
||||||
<PackagePath>styles</PackagePath>
|
|
||||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="Styles\package-lock.json">
|
|
||||||
<Pack>true</Pack>
|
|
||||||
<PackagePath>styles</PackagePath>
|
|
||||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="Styles\package.json">
|
|
||||||
<Pack>true</Pack>
|
|
||||||
<PackagePath>styles</PackagePath>
|
|
||||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Update="Styles\preTailwind.css">
|
|
||||||
<Pack>true</Pack>
|
|
||||||
<PackagePath>styles</PackagePath>
|
|
||||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Update="Styles\resolveNuget.js">
|
|
||||||
<Pack>true</Pack>
|
|
||||||
<PackagePath>styles</PackagePath>
|
|
||||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Update="Styles\style.css">
|
|
||||||
<Pack>true</Pack>
|
|
||||||
<PackagePath>styles</PackagePath>
|
|
||||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Update="Styles\mappings\mooncore.map">
|
|
||||||
<Pack>true</Pack>
|
|
||||||
<PackagePath>styles</PackagePath>
|
|
||||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="wwwroot\css\" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\js\moonCore.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\js\moonlight.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\svg\logo.svg" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
@source "../../Moonlight.Client/**/*.cs";
|
@source "../../Moonlight.Client/**/*.cs";
|
||||||
@source "../../Moonlight.Client/**/*.html";
|
@source "../../Moonlight.Client/**/*.html";
|
||||||
@source "../../Moonlight.Client/**/*.razor";
|
@source "../../Moonlight.Client/**/*.razor";
|
||||||
@source "../../Moonlight.Client/Styles/mappings/*.map";
|
@source "../../Moonlight.Client/Styles/**/*.map";
|
||||||
|
|
||||||
@source "../../Moonlight.ApiServer/**/*.razor";
|
@source "../../Moonlight.ApiServer/**/*.razor";
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="Styles/*" Pack="true" PackagePath="Styles/Moonlight.Client/" />
|
<None Include="Styles/mappings/*.map" Pack="true" PackagePath="Styles/" />
|
||||||
<None Include="Moonlight.Client.targets" Pack="true" PackagePath="build/Moonlight.Client.targets" />
|
<None Include="Moonlight.Client.targets" Pack="true" PackagePath="build/Moonlight.Client.targets" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
Reference in New Issue
Block a user