Build AD Bulk Tool / build (macos-latest, osx-arm64, ) (push) Canceled after 0s
Build AD Bulk Tool / build (macos-latest, osx-x64, ) (push) Canceled after 0s
Build AD Bulk Tool / build (ubuntu-latest, linux-x64, ) (push) Canceled after 0s
Build AD Bulk Tool / build (ubuntu-latest, win-x64, .exe) (push) Canceled after 0s
36 lines
808 B
PowerShell
36 lines
808 B
PowerShell
param(
|
|
[string]$Version = "1.0.0"
|
|
)
|
|
|
|
$Project = "ADBulkTool.csproj"
|
|
$Config = "Release"
|
|
|
|
function Publish {
|
|
param([string]$Rid, [string]$Suffix)
|
|
|
|
Write-Host "Publishing for $Rid..."
|
|
dotnet publish $Project `
|
|
-c $Config `
|
|
-r $Rid `
|
|
--self-contained true `
|
|
-p:PublishSingleFile=true `
|
|
-p:IncludeNativeLibrariesForSelfExtract=true `
|
|
-p:Version=$Version `
|
|
-o "publish/$Suffix"
|
|
|
|
Write-Host " -> publish/$Suffix"
|
|
}
|
|
|
|
Push-Location (Split-Path $PSScriptRoot)
|
|
|
|
Publish "win-x64" "windows-x64"
|
|
Publish "linux-x64" "linux-x64"
|
|
Publish "osx-x64" "macos-x64"
|
|
Publish "osx-arm64" "macos-arm64"
|
|
|
|
Write-Host ""
|
|
Write-Host "All builds complete. Artifacts are in ./publish/"
|
|
Get-ChildItem ./publish/*/ | Select-Object Name, Length
|
|
|
|
Pop-Location
|