mirror of
https://github.com/cmderdev/cmder.git
synced 2025-12-17 03:01:38 +08:00
Improve build summary: simplify message, reorder columns, add file type emojis
Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com>
This commit is contained in:
16
.github/workflows/build.yml
vendored
16
.github/workflows/build.yml
vendored
@@ -96,7 +96,7 @@ jobs:
|
|||||||
|
|
||||||
### Build Status
|
### Build Status
|
||||||
|
|
||||||
✅ Cmder launcher successfully compiled.
|
✅ Cmder built successfully.
|
||||||
|
|
||||||
"@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
|
"@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
|
||||||
|
|
||||||
@@ -140,7 +140,7 @@ jobs:
|
|||||||
|
|
||||||
### 🗃️ Artifacts
|
### 🗃️ Artifacts
|
||||||
|
|
||||||
| Artifact | Size | Hash (SHA256) | Download |
|
| Artifact | Size | Download | Hash (SHA256) |
|
||||||
| --- | --- | --- | --- |
|
| --- | --- | --- | --- |
|
||||||
"@
|
"@
|
||||||
|
|
||||||
@@ -151,7 +151,17 @@ jobs:
|
|||||||
$size = (Get-Item $path).Length / 1MB
|
$size = (Get-Item $path).Length / 1MB
|
||||||
$hash = (Get-FileHash $path -Algorithm SHA256).Hash
|
$hash = (Get-FileHash $path -Algorithm SHA256).Hash
|
||||||
$downloadUrl = "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
$downloadUrl = "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||||
$summary += "`n| ``$artifact`` | $([math]::Round($size, 2)) MB | ``$hash`` | [Download]($downloadUrl) |"
|
|
||||||
|
# Determine emoji based on file type
|
||||||
|
if ($artifact -match '\.txt$') {
|
||||||
|
$emoji = "📄"
|
||||||
|
} elseif ($artifact -match '\.(zip|7z)$') {
|
||||||
|
$emoji = "🗄️"
|
||||||
|
} else {
|
||||||
|
$emoji = "📦"
|
||||||
|
}
|
||||||
|
|
||||||
|
$summary += "`n| $emoji ``$artifact`` | $([math]::Round($size, 2)) MB | [📥 Download]($downloadUrl) | ``$hash`` |"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$summary += "`n"
|
$summary += "`n"
|
||||||
|
|||||||
Reference in New Issue
Block a user