Dynamically discover all build artifacts instead of hardcoding filenames

Agent-Logs-Url: https://github.com/cmderdev/cmder/sessions/8667c9a1-2ae6-4286-bcf4-f58735eb094e

Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-04-11 21:30:51 +00:00
committed by GitHub
parent 05b24c2173
commit 1418da1c18

View File

@@ -209,11 +209,14 @@ jobs:
return $null
}
$artifacts = @("cmder.zip", "cmder.7z", "cmder_mini.zip", "hashes.txt")
foreach ($artifact in $artifacts) {
$path = "build/$artifact"
if (Test-Path $path) {
$size = (Get-Item $path).Length / 1MB
# Get all files from the build directory (excluding directories and hidden files)
if (Test-Path "build") {
$buildFiles = Get-ChildItem -Path "build" -File | Where-Object { -not $_.Name.StartsWith('.') } | Sort-Object Name
foreach ($file in $buildFiles) {
$artifact = $file.Name
$path = $file.FullName
$size = $file.Length / 1MB
$hash = (Get-FileHash $path -Algorithm SHA256).Hash
# Try to get the actual artifact download URL