docs(changelog): add v0.1.1.3 download and SHA256 links; add release automation scripts (upload/prune/manage/checksums)

This commit is contained in:
mbusc
2025-08-28 17:05:06 +02:00
parent a741d3b969
commit eecbc47f5f
7 changed files with 330 additions and 0 deletions

View File

@ -0,0 +1,45 @@
param(
[Parameter(Mandatory=$true)][string]$Server,
[Parameter(Mandatory=$true)][string]$Owner,
[Parameter(Mandatory=$true)][string]$Repo,
[Parameter(Mandatory=$true)][string]$Token,
[Parameter(Mandatory=$true)][string]$Directory
)
$ErrorActionPreference = 'Stop'
if (-not (Test-Path -LiteralPath $Directory)) {
throw "Directory not found: $Directory"
}
$headers = @{ Authorization = "token $Token" }
$latestUrl = "$Server/api/v1/repos/$Owner/$Repo/releases/latest"
$latest = Invoke-RestMethod -Headers $headers -Method GET -Uri $latestUrl
if (-not $latest -or -not $latest.id) {
throw "Failed to get latest release from $latestUrl"
}
$rid = [string]$latest.id
Write-Host "Latest release id: $rid"
$files = Get-ChildItem -LiteralPath $Directory -Recurse -File
if (-not $files) {
Write-Host "No files to upload in $Directory"
exit 0
}
foreach ($f in $files) {
$name = $f.Name
$escapedName = [System.Uri]::EscapeDataString($name)
$uploadUrl = "$Server/api/v1/repos/$Owner/$Repo/releases/$rid/assets?name=$escapedName"
Write-Host "Uploading $name ..."
try {
$resp = Invoke-WebRequest -Headers $headers -Method Post -Uri $uploadUrl -Form @{ attachment = $f }
Write-Host " OK ($($resp.StatusCode))"
}
catch {
Write-Host " FAIL: $name -> $($_.Exception.Message)" -ForegroundColor Red
}
}