Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 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
165ca3b
Merge pull request #3076 from cmderdev/master
DRSDavidSoft Apr 11, 2026
f69c1db
Remove separator before artifacts, add sources.json link, and link ve…
Copilot Apr 11, 2026
05b24c2
Wrap buildTime in code formatting backticks while keeping small tag
Copilot Apr 11, 2026
1418da1
Dynamically discover all build artifacts instead of hardcoding filenames
Copilot Apr 11, 2026
aa801c2
Make artifact names clickable, use human-readable file sizes, and add…
Copilot Apr 11, 2026
2de93d1
Move Format-FileSize and Get-ArtifactDownloadUrl functions to utils.ps1
Copilot Apr 11, 2026
31e73cc
Fix vendor package release links and artifact download URLs
Copilot Apr 11, 2026
cbc7f53
Add workflow_dispatch to enable manual build workflow runs
Copilot Apr 11, 2026
25ea725
Fix Format-FileSize undefined error by sourcing utils.ps1 in artifact…
Copilot Apr 11, 2026
01d01c6
parse entire JSON string at once
DRSDavidSoft Apr 12, 2026
03deb9d
fix: handle links to vendor repo archive URL
DRSDavidSoft Apr 12, 2026
32cf876
fix: Derive directories from the array entries
DRSDavidSoft Apr 12, 2026
f3fa589
use double-quote for "`n"
DRSDavidSoft Apr 12, 2026
dcbb0e9
fix: Handle multi-line JSON
DRSDavidSoft Apr 12, 2026
c882ade
fix multi-line EOF syntax according to GitHub
DRSDavidSoft Apr 12, 2026
cb59bb5
Fix variable name casing inconsistency in vendor.yml (Summary -> summ…
Copilot Apr 12, 2026
0983e9b
Add duration tracking to test results and change hashes.txt separator…
Copilot Apr 12, 2026
55251f7
Show actual branch name and separate PR row in repository information
Copilot Apr 12, 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
215 changes: 162 additions & 53 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- "v*"
pull_request:
branches: [ "master", "development" ]
workflow_dispatch:

#---------------------------------#
# environment configuration #
Expand Down Expand Up @@ -42,17 +43,94 @@ 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
$cmderVersion = Get-VersionStr
$buildTime = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")

# Determine branch and PR information
$refName = "${{ github.ref_name }}"
$headRef = "${{ github.head_ref }}"
$eventName = "${{ github.event_name }}"
$prNumber = $null
$actualBranchName = $refName
$branchLink = ""
$prLink = ""

# Check if this is a PR merge ref (e.g., "3061/merge")
if ($refName -match '^(\d+)/(merge|head)$') {
$prNumber = $Matches[1]
# Use head_ref for the actual branch name if available
if ($headRef) {
$actualBranchName = $headRef
}
$branchLink = "https://github.com/${{ github.repository }}/tree/$actualBranchName"
$prLink = "https://github.com/${{ github.repository }}/pull/$prNumber"
} elseif ($eventName -eq "pull_request") {
# This is a pull request event
$prNumber = "${{ github.event.pull_request.number }}"
if ($headRef) {
$actualBranchName = $headRef
}
$branchLink = "https://github.com/${{ github.repository }}/tree/$actualBranchName"
$prLink = "https://github.com/${{ github.repository }}/pull/$prNumber"
} else {
# Regular branch, link to the branch tree
$branchLink = "https://github.com/${{ github.repository }}/tree/$refName"
}

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

<small>Build started: ``$buildTime``</small>

### Repository Information
| Property | Value |
| --- | --- |
| Repository | [``${{ github.repository }}``](https://github.com/${{ github.repository }}) |
| Branch | [``$actualBranchName``]($branchLink) |
$(if ($prNumber) { "| Pull Request | [#$prNumber]($prLink) |" })
| 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 ([sources.json](vendor/sources.json))
| Package | Version |
| --- | --- |
"@

# Read vendor sources.json and add to summary
$vendorSources = Get-Content -Raw "vendor/sources.json" | ConvertFrom-Json
if ($vendorSources.Count -eq 0) {
$summary += "`n| _No vendor packages found_ | |"
} else {
foreach ($vendor in $vendorSources) {
# Create release link based on vendor package
$versionLink = "$($vendor.version)"
if ($vendor.url) {
# Extract owner/repo/tag from the URL and create release link
# Handle both /releases/download/ and /archive/ URLs
if ($vendor.url -match 'github\.com/([^/]+)/([^/]+)/(releases/download|archive)/([^/]+)') {
$owner = $Matches[1]
$repo = $Matches[2]
$pathType = $Matches[3]
$tag = $Matches[4]
if ($pathType -eq 'archive') {
$tag = $tag -replace '\.(?:tar\.gz|tgz|zip)$', ''
}
$versionLink = "[$($vendor.version)](https://github.com/$owner/$repo/releases/tag/$tag)"
}
}
$summary += "`n| ``$($vendor.name)`` | $versionLink |"
}
}

$summary += "`n"

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

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v3
Expand All @@ -66,36 +144,21 @@ 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 = @"

---

βœ… 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@v7
with:
Expand Down Expand Up @@ -128,15 +191,55 @@ 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
# Source utility functions
. scripts/utils.ps1

$summary = @"

### πŸ—ƒοΈ Artifacts

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

# 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
$sizeFormatted = Format-FileSize -Bytes $file.Length
$hash = (Get-FileHash $path -Algorithm SHA256).Hash

# Try to get the actual artifact download URL
$downloadUrl = Get-ArtifactDownloadUrl -ArtifactName $artifact -Repository "${{ github.repository }}" -RunId "${{ github.run_id }}"
$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|rar|7z)$') {
$emoji = "πŸ—„οΈ"
} else {
$emoji = "πŸ“¦"
}

$summary += "`n| $emoji [``$artifact``$warning]($downloadUrl) | $sizeFormatted | ``$hash`` |"
}
}
$summary += "`n"

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

- name: Create Release
uses: softprops/action-gh-release@v2
Expand All @@ -154,14 +257,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 }}``**

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