mirror of
https://github.com/cmderdev/cmder.git
synced 2026-02-25 06:26:08 +08:00
Fixes and Cleanup
This commit is contained in:
4
.github/dependabot.yml
vendored
4
.github/dependabot.yml
vendored
@@ -5,7 +5,11 @@
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
# Enable version updates for GitHub Actions
|
||||
- package-ecosystem: "github-actions" # See documentation for possible values
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
labels:
|
||||
- "👆 Dependencies"
|
||||
- "🔄️ GitHub Actions"
|
||||
|
||||
21
.github/workflows/build.yml
vendored
21
.github/workflows/build.yml
vendored
@@ -93,6 +93,7 @@ jobs:
|
||||
$summary += "`n| ``$($vendor.name)`` | $($vendor.version) |"
|
||||
}
|
||||
}
|
||||
|
||||
$summary += "`n"
|
||||
|
||||
$summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
|
||||
@@ -109,7 +110,7 @@ jobs:
|
||||
if: success()
|
||||
shell: pwsh
|
||||
run: |
|
||||
@"
|
||||
$summary = @"
|
||||
|
||||
---
|
||||
|
||||
@@ -117,7 +118,9 @@ jobs:
|
||||
|
||||
✅ Cmder built successfully.
|
||||
|
||||
"@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
|
||||
"@
|
||||
|
||||
$summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
|
||||
|
||||
- name: Pack the built files
|
||||
shell: pwsh
|
||||
@@ -125,26 +128,26 @@ jobs:
|
||||
run: .\pack.ps1 -verbose
|
||||
|
||||
- name: Upload artifact (cmder.zip)
|
||||
uses: actions/upload-artifact@v5
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
path: build/cmder.zip
|
||||
name: cmder.zip
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload artifact (cmder.7z)
|
||||
uses: actions/upload-artifact@v5
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
path: build/cmder.7z
|
||||
name: cmder.7z
|
||||
|
||||
- name: Upload artifact (cmder_mini.zip)
|
||||
uses: actions/upload-artifact@v5
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
path: build/cmder_mini.zip
|
||||
name: cmder_mini.zip
|
||||
|
||||
- name: Upload artifact (hashes.txt)
|
||||
uses: actions/upload-artifact@v5
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
path: build/hashes.txt
|
||||
name: hashes.txt
|
||||
@@ -245,7 +248,7 @@ jobs:
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
shell: pwsh
|
||||
run: |
|
||||
@"
|
||||
$summary = @"
|
||||
|
||||
---
|
||||
|
||||
@@ -259,4 +262,6 @@ jobs:
|
||||
- File hashes (``hashes.txt``)
|
||||
|
||||
> ⚠️ Release is in **draft** mode. Please review and publish manually.
|
||||
"@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
|
||||
"@
|
||||
|
||||
$summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
|
||||
|
||||
18
.github/workflows/codeql.yml
vendored
18
.github/workflows/codeql.yml
vendored
@@ -50,7 +50,7 @@ jobs:
|
||||
- name: Summary - CodeQL analysis started
|
||||
shell: pwsh
|
||||
run: |
|
||||
@"
|
||||
$summary = @"
|
||||
## 🔒 CodeQL Security Analysis - Workflow Summary
|
||||
|
||||
### Analysis Configuration
|
||||
@@ -62,7 +62,9 @@ jobs:
|
||||
| Language | ``${{ matrix.language }}`` |
|
||||
| Commit | ``${{ github.sha }}`` |
|
||||
|
||||
"@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
|
||||
"@
|
||||
|
||||
$summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
@@ -88,12 +90,14 @@ jobs:
|
||||
if: success()
|
||||
shell: pwsh
|
||||
run: |
|
||||
@"
|
||||
$summary = @"
|
||||
### ✅ Build Completed
|
||||
|
||||
Cmder launcher built successfully for CodeQL analysis.
|
||||
|
||||
"@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
|
||||
"@
|
||||
|
||||
$summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v4
|
||||
@@ -104,7 +108,7 @@ jobs:
|
||||
if: success()
|
||||
shell: pwsh
|
||||
run: |
|
||||
@"
|
||||
$summary = @"
|
||||
### 🔍 CodeQL Analysis Results
|
||||
|
||||
✅ CodeQL security analysis completed successfully.
|
||||
@@ -112,4 +116,6 @@ jobs:
|
||||
**Language analyzed:** ``${{ matrix.language }}``
|
||||
|
||||
> Check the Security tab for detailed findings and recommendations.
|
||||
"@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
|
||||
"@
|
||||
|
||||
$summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
|
||||
|
||||
18
.github/workflows/tests.yml
vendored
18
.github/workflows/tests.yml
vendored
@@ -47,7 +47,7 @@ jobs:
|
||||
. scripts/utils.ps1
|
||||
$cmderVersion = Get-VersionStr
|
||||
|
||||
@"
|
||||
$summary = @"
|
||||
## ✅ Run Tests - Workflow Summary
|
||||
|
||||
### Test Environment
|
||||
@@ -61,7 +61,9 @@ jobs:
|
||||
| PowerShell Version | **$($PSVersionTable.PSVersion)** |
|
||||
| Event | ``${{ github.event_name }}`` |
|
||||
|
||||
"@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
|
||||
"@
|
||||
|
||||
$summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
|
||||
|
||||
- name: Initialize vendors
|
||||
shell: pwsh
|
||||
@@ -106,12 +108,14 @@ jobs:
|
||||
if: success()
|
||||
shell: pwsh
|
||||
run: |
|
||||
@"
|
||||
$summary = @"
|
||||
### 📋 Test Results
|
||||
|
||||
| Test | Status | Duration |
|
||||
| --- | --- | --- |
|
||||
"@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
|
||||
"@
|
||||
|
||||
$summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
|
||||
|
||||
- name: Testing Clink Shell
|
||||
id: test-clink
|
||||
@@ -148,7 +152,7 @@ jobs:
|
||||
if: success()
|
||||
shell: pwsh
|
||||
run: |
|
||||
@"
|
||||
$summary = @"
|
||||
|
||||
### ✅ All Tests Completed
|
||||
|
||||
@@ -158,4 +162,6 @@ jobs:
|
||||
- ✅ Clink shell environment (Windows cmd.exe with Clink)
|
||||
- ✅ PowerShell environment (with Cmder profile)
|
||||
- ✅ Bash environment (Git Bash integration)
|
||||
"@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
|
||||
"@
|
||||
|
||||
$summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
|
||||
|
||||
24
.github/workflows/vendor.yml
vendored
24
.github/workflows/vendor.yml
vendored
@@ -31,12 +31,14 @@ jobs:
|
||||
- name: Summary - Workflow started
|
||||
shell: pwsh
|
||||
run: |
|
||||
@"
|
||||
$summary = @"
|
||||
## 📦 Update Vendor - Workflow Summary
|
||||
|
||||
Checking for vendor dependency updates...
|
||||
|
||||
"@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
|
||||
"@
|
||||
|
||||
$summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
|
||||
|
||||
- id: make-changes
|
||||
name: Checking for updates
|
||||
@@ -66,22 +68,24 @@ jobs:
|
||||
run: |
|
||||
$count = $env:COUNT_UPDATED
|
||||
if ($count -eq 0) {
|
||||
@"
|
||||
$summary = @"
|
||||
### ✅ No Updates Available
|
||||
|
||||
All vendor dependencies are up to date.
|
||||
"@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
|
||||
"@
|
||||
} else {
|
||||
$word = if ($count -eq 1) { 'dependency' } else { 'dependencies' }
|
||||
@"
|
||||
$summary = @"
|
||||
### 🔄 Updates Found
|
||||
|
||||
**$count** vendor $word updated:
|
||||
|
||||
$env:UPDATE_MESSAGE
|
||||
|
||||
"@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
|
||||
"@
|
||||
}
|
||||
|
||||
$summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
|
||||
|
||||
- uses: peter-evans/create-pull-request@v7
|
||||
if: env.COUNT_UPDATED > 0
|
||||
@@ -100,9 +104,9 @@ jobs:
|
||||
if: env.COUNT_UPDATED > 0
|
||||
shell: pwsh
|
||||
run: |
|
||||
@"
|
||||
$Summary = @"
|
||||
### 🎉 Pull Request Created
|
||||
|
||||
|
||||
A pull request has been created to update the vendor dependencies.
|
||||
|
||||
**Branch:** ``update-vendor``
|
||||
@@ -110,4 +114,6 @@ jobs:
|
||||
**Updated dependencies:** $env:LIST_UPDATED
|
||||
|
||||
> Please review and merge the pull request to apply the updates.
|
||||
"@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
|
||||
"@
|
||||
|
||||
$summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
|
||||
|
||||
Reference in New Issue
Block a user