From 1418da1c188c8da6e19b55cda7df12f74ba9ac32 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 11 Apr 2026 21:30:51 +0000 Subject: [PATCH] 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> --- .github/workflows/build.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f6cb34d..6bd4d11 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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