You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
recyclarr/ci/PublishAndZip.ps1

31 lines
880 B

[CmdletBinding()]
param (
[Parameter(Mandatory=$true)]
[string]
$runtime
)
$ErrorActionPreference = "Stop"
# Note for `IncludeSymbolsInSingleFile`:
#
# This is only required because LibGit2Sharp bundles PDB files in its nuget package.
# See the following github issues for more info:
#
# - https://github.com/dotnet/runtime/issues/3807
# - https://github.com/libgit2/libgit2sharp.nativebinaries/issues/111
dotnet publish src\Trash `
--output publish\$runtime `
--configuration Release `
--runtime $runtime `
--self-contained true `
-p:PublishSingleFile=true `
-p:PublishTrimmed=true `
-p:IncludeNativeLibrariesForSelfExtract=true `
-p:IncludeSymbolsInSingleFile=true `
-p:PublishReadyToRun=true
New-Item -ItemType Directory -Force -Path publish\zip
Compress-Archive publish\$runtime\trash* publish\zip\trash-$runtime.zip -Force