Add publish scripts, Gitea Actions workflow, and pre-built binary downloads to README
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
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
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
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
|
||||
Executable
+32
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
PROJECT="ADBulkTool.csproj"
|
||||
CONFIG="Release"
|
||||
VERSION="${1:-1.0.0}"
|
||||
|
||||
publish() {
|
||||
local rid="$1"
|
||||
local suffix="$2"
|
||||
echo "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"
|
||||
echo " -> publish/$suffix"
|
||||
}
|
||||
|
||||
publish "win-x64" "windows-x64"
|
||||
publish "linux-x64" "linux-x64"
|
||||
publish "osx-x64" "macos-x64"
|
||||
publish "osx-arm64" "macos-arm64"
|
||||
|
||||
echo ""
|
||||
echo "All builds complete. Artifacts are in ./publish/"
|
||||
ls -lh publish/*/
|
||||
Reference in New Issue
Block a user