Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
3810b8d
Initial plan
Copilot Dec 14, 2025
1e04711
Change test emoji from πŸ§ͺ to βœ… in workflow summary
Copilot Dec 14, 2025
0bc7fd3
Improve build workflow summary: add links, vendor packages, full hash…
Copilot Dec 14, 2025
2057ee5
Fix incomplete summary by initializing $summary variable before appen…
Copilot Dec 15, 2025
bff3862
Use πŸ—ƒοΈ emoji for Vendor Packages and Artifacts sections
Copilot Dec 15, 2025
838c1cf
Add backticks to clickable links for code formatting in Repository In…
Copilot Dec 15, 2025
27c7a0c
Improve build summary: simplify message, reorder columns, add file ty…
Copilot Dec 15, 2025
a937901
Change emoji for Vendor Packages section
DRSDavidSoft Dec 15, 2025
825df3a
Fix branch link for PR merge refs to point to PR instead of invalid t…
Copilot Dec 15, 2025
a52b0b9
Update .github/workflows/tests.yml
DRSDavidSoft Dec 15, 2025
641ce7b
Update .github/workflows/build.yml
DRSDavidSoft Dec 15, 2025
2780a43
Update .github/workflows/tests.yml
DRSDavidSoft Dec 15, 2025
684185c
Fix vendor workflow Unicode escape error by converting echo to PowerS…
Copilot Dec 25, 2025
dc93fa5
Add real artifact download URLs with retry logic and fallback to run …
Copilot Dec 25, 2025
e71c767
Fixes and Cleanup
daxgames Feb 22, 2026
48cc28a
Fix yaml errors
daxgames Feb 22, 2026
0022826
Merge branch 'master' into copilot/fix-github-step-summary
daxgames Feb 22, 2026
6858619
x
daxgames Feb 22, 2026
6137073
fix path to sources.json
daxgames Feb 22, 2026
66ab9ad
remove nodejs files
daxgames Feb 22, 2026
0c6b2d9
Add back comments
daxgames Feb 22, 2026
adbd632
Merge branch 'master' into copilot/fix-github-step-summary
daxgames Feb 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
# Enable version updates for GitHub Actions
- package-ecosystem: "github-actions"
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
Expand Down
210 changes: 157 additions & 53 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,61 @@ jobs:
- name: Summary - Repository checkout
shell: pwsh
run: |
echo "## πŸ“¦ Build Cmder - Workflow Summary" >> $env:GITHUB_STEP_SUMMARY
echo "" >> $env:GITHUB_STEP_SUMMARY
echo "### Repository Information" >> $env:GITHUB_STEP_SUMMARY
echo "| Property | Value |" >> $env:GITHUB_STEP_SUMMARY
echo "| --- | --- |" >> $env:GITHUB_STEP_SUMMARY
echo "| Repository | \`${{ github.repository }}\` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Branch | \`${{ github.ref_name }}\` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Commit | \`${{ github.sha }}\` |" >> $env:GITHUB_STEP_SUMMARY
echo "| Actor | @${{ github.actor }} |" >> $env:GITHUB_STEP_SUMMARY
echo "| Workflow | \`${{ github.workflow }}\` |" >> $env:GITHUB_STEP_SUMMARY
echo "" >> $env:GITHUB_STEP_SUMMARY
# Get Cmder version
. scripts/utils.ps1
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The script sources utils.ps1 without error handling. If the script file doesn't exist or has syntax errors, this will cause the step to fail. Consider adding error handling to verify the script exists and can be loaded successfully.

Suggested change
. scripts/utils.ps1
if (-not (Test-Path "scripts/utils.ps1")) {
Write-Error "scripts/utils.ps1 not found. Exiting."
exit 1
}
try {
. scripts/utils.ps1
} catch {
Write-Error "Failed to source scripts/utils.ps1: $_"
exit 1
}

Copilot uses AI. Check for mistakes.
$cmderVersion = Get-VersionStr
$buildTime = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")

# Determine branch link (handle PR merge refs)
$branchName = "${{ github.ref_name }}"
$branchLink = ""
if ($branchName -match '^(\d+)/(merge|head)$') {
# This is a PR merge/head ref, link to the PR
$prNumber = $Matches[1]
$branchLink = "https://github.com/${{ github.repository }}/pull/$prNumber"
} elseif ("${{ github.event_name }}" -eq "pull_request") {
# This is a pull request event, link to the PR
$branchLink = "https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }}"
} else {
# Regular branch, link to the branch tree
$branchLink = "https://github.com/${{ github.repository }}/tree/${{ github.ref_name }}"
}

$summary = @"
## πŸ“¦ Build Cmder - Workflow Summary

<small>Build started: $buildTime</small>
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the <small> HTML tag in GitHub markdown may not render consistently across all viewers (like mobile apps or email notifications). Consider using markdown italic formatting with asterisks instead: *Build started: $buildTime* for better compatibility.

Suggested change
<small>Build started: $buildTime</small>
*Build started: $buildTime*

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Also wrap $buildTime in code tag (`)


### Repository Information
| Property | Value |
| --- | --- |
| Repository | [``${{ github.repository }}``](https://github.com/${{ github.repository }}) |
| Branch | [``$branchName``]($branchLink) |
| Commit | [``${{ github.sha }}``](https://github.com/${{ github.repository }}/commit/${{ github.sha }}) |
| Actor | [@${{ github.actor }}](https://github.com/${{ github.actor }}) |
| Workflow | ``${{ github.workflow }}`` |
| Cmder Version | **$cmderVersion** |

---

### πŸ“ Vendor Packages
| Package | Version |
| --- | --- |
"@

# Read vendor sources.json and add to summary
$vendorSources = Get-Content "vendor/sources.json" | ConvertFrom-Json
if ($vendorSources.Count -eq 0) {
$summary += "`n| _No vendor packages found_ | |"
} else {
foreach ($vendor in $vendorSources) {
$summary += "`n| ``$($vendor.name)`` | $($vendor.version) |"
}
}

$summary += "`n"

$summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2
Expand All @@ -66,36 +110,23 @@ jobs:
if: success()
shell: pwsh
run: |
echo "### βœ… Build Status" >> $env:GITHUB_STEP_SUMMARY
echo "" >> $env:GITHUB_STEP_SUMMARY
echo "Cmder launcher successfully compiled." >> $env:GITHUB_STEP_SUMMARY
echo "" >> $env:GITHUB_STEP_SUMMARY
$summary = @"

---

### Build Status

βœ… Cmder built successfully.

"@

$summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8

- name: Pack the built files
shell: pwsh
working-directory: scripts
run: .\pack.ps1 -verbose

- name: Summary - Package artifacts
if: success()
shell: pwsh
run: |
echo "### πŸ“¦ Artifacts Created" >> $env:GITHUB_STEP_SUMMARY
echo "" >> $env:GITHUB_STEP_SUMMARY
echo "| Artifact | Size | Hash (SHA256) |" >> $env:GITHUB_STEP_SUMMARY
echo "| --- | --- | --- |" >> $env:GITHUB_STEP_SUMMARY
$artifacts = @("cmder.zip", "cmder.7z", "cmder_mini.zip")
foreach ($artifact in $artifacts) {
$path = "build/$artifact"
if (Test-Path $path) {
$size = (Get-Item $path).Length / 1MB
# Truncate hash to first 16 chars for summary readability (full hash in hashes.txt)
$hash = (Get-FileHash $path -Algorithm SHA256).Hash.Substring(0, 16)
echo "| \`$artifact\` | $([math]::Round($size, 2)) MB | \`$hash...\` |" >> $env:GITHUB_STEP_SUMMARY
}
}
echo "" >> $env:GITHUB_STEP_SUMMARY

- name: Upload artifact (cmder.zip)
uses: actions/upload-artifact@v6
with:
Expand Down Expand Up @@ -124,15 +155,82 @@ jobs:
- name: Summary - Artifacts uploaded
if: success()
shell: pwsh
env:
GH_TOKEN: ${{ github.token }}
run: |
echo "### ☁️ Upload Status" >> $env:GITHUB_STEP_SUMMARY
echo "" >> $env:GITHUB_STEP_SUMMARY
echo "All artifacts successfully uploaded to GitHub Actions:" >> $env:GITHUB_STEP_SUMMARY
echo '- βœ… `cmder.zip`' >> $env:GITHUB_STEP_SUMMARY
echo '- βœ… `cmder.7z`' >> $env:GITHUB_STEP_SUMMARY
echo '- βœ… `cmder_mini.zip`' >> $env:GITHUB_STEP_SUMMARY
echo '- βœ… `hashes.txt`' >> $env:GITHUB_STEP_SUMMARY
echo "" >> $env:GITHUB_STEP_SUMMARY
$summary = @"

---

### πŸ—ƒοΈ Artifacts

| Artifact | Size | Download | Hash (SHA256) |
| --- | --- | --- | --- |
"@

# Function to get artifact download URL with retry logic
function Get-ArtifactDownloadUrl {
param(
[string]$ArtifactName,
[int]$MaxRetries = 3,
[int]$DelaySeconds = 2
)

for ($i = 0; $i -lt $MaxRetries; $i++) {
try {
# Use GitHub CLI to get artifact information
$artifactsJson = gh api "repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts" --jq ".artifacts[] | select(.name == `"$ArtifactName`")"

if ($artifactsJson) {
$artifact = $artifactsJson | ConvertFrom-Json
if ($artifact.archive_download_url) {
return $artifact.archive_download_url
}
}
} catch {
Write-Host "Attempt $($i + 1) failed to get artifact URL for $ArtifactName : $_"
}

if ($i -lt ($MaxRetries - 1)) {
Start-Sleep -Seconds $DelaySeconds
}
}

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
$hash = (Get-FileHash $path -Algorithm SHA256).Hash
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file hash calculation doesn't include error handling. If a file doesn't exist (the Test-Path check passed) but becomes unavailable before Get-FileHash is called, this will cause an error. Consider adding error handling around Get-FileHash or combining the Test-Path check with the hash calculation in a try-catch block.

Suggested change
$hash = (Get-FileHash $path -Algorithm SHA256).Hash
try {
$hash = (Get-FileHash $path -Algorithm SHA256).Hash
} catch {
$hash = "N/A"
}

Copilot uses AI. Check for mistakes.

# Try to get the actual artifact download URL
$downloadUrl = Get-ArtifactDownloadUrl -ArtifactName $artifact
$warning = ""

if (-not $downloadUrl) {
# Fallback to workflow run page if artifact URL fetch fails
$downloadUrl = "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
$warning = " ⚠️"
}

# 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$warning]($downloadUrl) | ``$hash`` |"
}
}
$summary += "`n"

$summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8

- name: Create Release
uses: softprops/action-gh-release@v2
Expand All @@ -150,14 +248,20 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
shell: pwsh
run: |
echo "### πŸš€ Release Information" >> $env:GITHUB_STEP_SUMMARY
echo "" >> $env:GITHUB_STEP_SUMMARY
echo "Draft release created for tag: **\`${{ github.ref_name }}\`**" >> $env:GITHUB_STEP_SUMMARY
echo "" >> $env:GITHUB_STEP_SUMMARY
echo "Release includes:" >> $env:GITHUB_STEP_SUMMARY
echo "- Full version (\`cmder.zip\`, \`cmder.7z\`)" >> $env:GITHUB_STEP_SUMMARY
echo "- Mini version (\`cmder_mini.zip\`)" >> $env:GITHUB_STEP_SUMMARY
echo "- File hashes (\`hashes.txt\`)" >> $env:GITHUB_STEP_SUMMARY
echo "" >> $env:GITHUB_STEP_SUMMARY
echo "> ⚠️ Release is in **draft** mode. Please review and publish manually." >> $env:GITHUB_STEP_SUMMARY
$summary = @"

---

### Release Information

πŸš€ Draft release created for tag: **``${{ github.ref_name }}``**
Comment on lines +255 to +257
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The heading "Release Information" is missing an emoji prefix, while the content below uses the πŸš€ emoji. For consistency with other section headings, consider moving the emoji to the heading itself (e.g., "### πŸš€ Release Information") rather than having it in the body text.

Suggested change
### Release Information
πŸš€ Draft release created for tag: **``${{ github.ref_name }}``**
### πŸš€ Release Information
Draft release created for tag: **``${{ github.ref_name }}``**

Copilot uses AI. Check for mistakes.

Release includes:
- Full version (``cmder.zip``, ``cmder.7z``)
- Mini version (``cmder_mini.zip``)
- File hashes (``hashes.txt``)

> ⚠️ Release is in **draft** mode. Please review and publish manually.
"@

$summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
65 changes: 34 additions & 31 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,21 @@ jobs:
- name: Summary - CodeQL analysis started
shell: pwsh
run: |
$summary = @(
'## πŸ”’ CodeQL Security Analysis - Workflow Summary'
''
'### Analysis Configuration'
''
'| Property | Value |'
'| --- | --- |'
'| Repository | `${{ github.repository }}` |'
'| Branch | `${{ github.ref_name }}` |'
'| Language | `${{ matrix.language }}` |'
'| Commit | `${{ github.sha }}` |'
''
)
$summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY
$summary = @"
## πŸ”’ CodeQL Security Analysis - Workflow Summary

### Analysis Configuration

| Property | Value |
| --- | --- |
| Repository | ``${{ github.repository }}`` |
| Branch | ``${{ github.ref_name }}`` |
| Language | ``${{ matrix.language }}`` |
| Commit | ``${{ github.sha }}`` |

"@

$summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand All @@ -89,13 +90,14 @@ jobs:
if: success()
shell: pwsh
run: |
$summary = @(
'### βœ… Build Completed'
''
'Cmder launcher built successfully for CodeQL analysis.'
''
)
$summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY
$summary = @"
### βœ… Build Completed

Cmder launcher built successfully for CodeQL analysis.

"@

$summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
Expand All @@ -106,13 +108,14 @@ jobs:
if: success()
shell: pwsh
run: |
$summary = @(
'### πŸ” CodeQL Analysis Results'
''
'βœ… CodeQL security analysis completed successfully.'
''
'**Language analyzed:** `${{ matrix.language }}`'
''
'> Check the Security tab for detailed findings and recommendations.'
)
$summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY
$summary = @"
### πŸ” CodeQL Analysis Results

βœ… CodeQL security analysis completed successfully.

**Language analyzed:** ``${{ matrix.language }}``

> Check the Security tab for detailed findings and recommendations.
"@

$summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
Loading
Loading