mirror of
https://github.com/cmderdev/cmder.git
synced 2026-04-14 22:04:32 +08:00
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:
committed by
GitHub
parent
05b24c2173
commit
1418da1c18
13
.github/workflows/build.yml
vendored
13
.github/workflows/build.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user