mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
ci: add self-contained publish for Avalonia build
- Add Net9.0-SelfContained.pubxml publish profile for Avalonia - Add Publish-Self-Contained-Avalonia function to post_build.ps1 - Call Avalonia publish before cleanup in Main function
This commit is contained in:
parent
82390b580e
commit
e726c44559
2 changed files with 37 additions and 0 deletions
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Any CPU</Platform>
|
||||
<TargetFramework>net9.0-windows10.0.19041.0</TargetFramework>
|
||||
<PublishDir>..\Output\Release\Avalonia\</PublishDir>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<SelfContained>true</SelfContained>
|
||||
<PublishSingleFile>False</PublishSingleFile>
|
||||
<PublishReadyToRun>False</PublishReadyToRun>
|
||||
<PublishTrimmed>False</PublishTrimmed>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
@ -135,6 +135,24 @@ function Publish-Self-Contained ($p) {
|
|||
dotnet publish -c Release $csproj /p:PublishProfile=$profile
|
||||
}
|
||||
|
||||
function Publish-Self-Contained-Avalonia ($p) {
|
||||
$csproj = "$p\Flow.Launcher.Avalonia\Flow.Launcher.Avalonia.csproj"
|
||||
$profile = "$p\Flow.Launcher.Avalonia\Properties\PublishProfiles\Net9.0-SelfContained.pubxml"
|
||||
|
||||
if (!(Test-Path $csproj)) {
|
||||
Write-Host "Avalonia project not found at $csproj, skipping self-contained publish..."
|
||||
return
|
||||
}
|
||||
|
||||
if (!(Test-Path $profile)) {
|
||||
Write-Host "Avalonia publish profile not found at $profile, skipping self-contained publish..."
|
||||
return
|
||||
}
|
||||
|
||||
Write-Host "Publishing Avalonia self-contained..."
|
||||
dotnet publish -c Release $csproj /p:PublishProfile=$profile
|
||||
}
|
||||
|
||||
function Publish-Portable ($outputLocation, $version) {
|
||||
|
||||
& $outputLocation\Flow-Launcher-Setup.exe --silent | Out-Null
|
||||
|
|
@ -156,6 +174,7 @@ function Main {
|
|||
Remove-CreateDumpExe $p $config
|
||||
|
||||
# Process Avalonia build
|
||||
Publish-Self-Contained-Avalonia $p
|
||||
Delete-Unused-Avalonia $p $config
|
||||
Remove-CreateDumpExe-Avalonia $p $config
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue