- Executable is now compiled using Ready to Run. This increases the size of the executable but makes the code much faster. - `src` directory is no longer the cwd - The matrix build in build.yml now runs on its respective platform to avoid cross compilation. Cross compiling does not work with the ReadyToRun optimization on, see: https://docs.microsoft.com/en-us/dotnet/core/deploying/ready-to-run#cross-platformarchitecture-restrictions - publish and zip steps in the workflow have been put in a powershell script for reusability and to keep the workflow YAML minimal.recyclarr
parent
1b09094aa1
commit
eaeb06eb26
@ -0,0 +1,21 @@
|
|||||||
|
[CmdletBinding()]
|
||||||
|
param (
|
||||||
|
[Parameter(Mandatory=$true)]
|
||||||
|
[string]
|
||||||
|
$runtime
|
||||||
|
)
|
||||||
|
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
||||||
|
dotnet publish src\Trash `
|
||||||
|
--output publish\$runtime `
|
||||||
|
--configuration Release `
|
||||||
|
--runtime $runtime `
|
||||||
|
--self-contained true `
|
||||||
|
-p:PublishSingleFile=true `
|
||||||
|
-p:PublishTrimmed=true `
|
||||||
|
-p:IncludeNativeLibrariesForSelfExtract=true `
|
||||||
|
-p:PublishReadyToRun=true
|
||||||
|
|
||||||
|
New-Item -ItemType Directory -Force -Path publish\zip
|
||||||
|
Compress-Archive publish\$runtime\trash* publish\zip\trash-$runtime.zip -Force
|
Loading…
Reference in new issue