Skip to content

Commit 6edcfee

Browse files
committed
workflow updates
1 parent a46c8e8 commit 6edcfee

5 files changed

Lines changed: 296 additions & 104 deletions

File tree

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55

66
version: 2
77
updates:
8+
# Enable version updates for GitHub Actions
89
- package-ecosystem: "github-actions" # See documentation for possible values
910
directory: "/" # Location of package manifests
1011
schedule:
1112
interval: "weekly"
13+
labels:
14+
- "👆 Dependencies"
15+
- "🔄️ GitHub Actions"

.github/workflows/build.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
tags:
1212
- "v*"
1313
pull_request:
14-
branches: [ "main" ]
14+
branches: [ "main", "dev" ]
1515

1616
#---------------------------------#
1717
# environment configuration #
@@ -93,6 +93,7 @@ jobs:
9393
$summary += "`n| ``$($vendor.name)`` | $($vendor.version) |"
9494
}
9595
}
96+
9697
$summary += "`n"
9798
9899
$summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
@@ -109,42 +110,44 @@ jobs:
109110
if: success()
110111
shell: pwsh
111112
run: |
112-
@"
113+
$summary = @"
113114
114115
---
115116
116117
### Build Status
117118
118119
✅ Cmder built successfully.
119120
120-
"@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
121+
"@
122+
123+
$summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
121124
122125
- name: Pack the built files
123126
shell: pwsh
124127
working-directory: scripts
125128
run: .\pack.ps1 -verbose
126129

127130
- name: Upload artifact (cmder.zip)
128-
uses: actions/upload-artifact@v5
131+
uses: actions/upload-artifact@v6
129132
with:
130133
path: build/cmder.zip
131134
name: cmder.zip
132135
if-no-files-found: error
133136

134137
- name: Upload artifact (cmder.7z)
135-
uses: actions/upload-artifact@v5
138+
uses: actions/upload-artifact@v6
136139
with:
137140
path: build/cmder.7z
138141
name: cmder.7z
139142

140143
- name: Upload artifact (cmder_mini.zip)
141-
uses: actions/upload-artifact@v5
144+
uses: actions/upload-artifact@v6
142145
with:
143146
path: build/cmder_mini.zip
144147
name: cmder_mini.zip
145148

146149
- name: Upload artifact (hashes.txt)
147-
uses: actions/upload-artifact@v5
150+
uses: actions/upload-artifact@v6
148151
with:
149152
path: build/hashes.txt
150153
name: hashes.txt
@@ -245,7 +248,7 @@ jobs:
245248
if: startsWith(github.ref, 'refs/tags/')
246249
shell: pwsh
247250
run: |
248-
@"
251+
$summary = @"
249252
250253
---
251254
@@ -259,4 +262,6 @@ jobs:
259262
- File hashes (``hashes.txt``)
260263
261264
> ⚠️ Release is in **draft** mode. Please review and publish manually.
262-
"@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
265+
"@
266+
267+
$summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8

.github/workflows/codeql.yml

Lines changed: 36 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ name: "CodeQL"
88

99
on:
1010
push:
11-
branches: [ "main" ]
11+
branches: [ "main", "dev" ]
1212
paths-ignore:
1313
- '**/*.md'
1414
- '**/*.txt'
1515
- '.github/**'
1616
- '**/.gitignore'
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ "main" ]
19+
branches: [ "main", "dev" ]
2020
paths-ignore:
2121
- '**/*.md'
2222
- '**/*.txt'
@@ -50,19 +50,21 @@ jobs:
5050
- name: Summary - CodeQL analysis started
5151
shell: pwsh
5252
run: |
53-
@"
54-
## 🔒 CodeQL Security Analysis - Workflow Summary
55-
56-
### Analysis Configuration
57-
58-
| Property | Value |
59-
| --- | --- |
60-
| Repository | ``${{ github.repository }}`` |
61-
| Branch | ``${{ github.ref_name }}`` |
62-
| Language | ``${{ matrix.language }}`` |
63-
| Commit | ``${{ github.sha }}`` |
64-
65-
"@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
53+
$summary = @"
54+
## 🔒 CodeQL Security Analysis - Workflow Summary
55+
56+
### Analysis Configuration
57+
58+
| Property | Value |
59+
| --- | --- |
60+
| Repository | ``${{ github.repository }}`` |
61+
| Branch | ``${{ github.ref_name }}`` |
62+
| Language | ``${{ matrix.language }}`` |
63+
| Commit | ``${{ github.sha }}`` |
64+
65+
"@
66+
67+
$summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
6668
6769
# Initializes the CodeQL tools for scanning.
6870
- name: Initialize CodeQL
@@ -88,12 +90,14 @@ jobs:
8890
if: success()
8991
shell: pwsh
9092
run: |
91-
@"
92-
### ✅ Build Completed
93-
94-
Cmder launcher built successfully for CodeQL analysis.
95-
96-
"@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
93+
$summary = @"
94+
### ✅ Build Completed
95+
96+
Cmder launcher built successfully for CodeQL analysis.
97+
98+
"@
99+
100+
$summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
97101
98102
- name: Perform CodeQL Analysis
99103
uses: github/codeql-action/analyze@v4
@@ -104,12 +108,14 @@ jobs:
104108
if: success()
105109
shell: pwsh
106110
run: |
107-
@"
108-
### 🔍 CodeQL Analysis Results
109-
110-
✅ CodeQL security analysis completed successfully.
111-
112-
**Language analyzed:** ``${{ matrix.language }}``
113-
114-
> Check the Security tab for detailed findings and recommendations.
115-
"@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
111+
$summary = @"
112+
### 🔍 CodeQL Analysis Results
113+
114+
✅ CodeQL security analysis completed successfully.
115+
116+
**Language analyzed:** ``${{ matrix.language }}``
117+
118+
> Check the Security tab for detailed findings and recommendations.
119+
"@
120+
121+
$summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8

.github/workflows/tests.yml

Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches:
66
- main
7-
7+
- dev
88
paths-ignore:
99
- '**/*.md'
1010
- '**/*.txt'
@@ -13,7 +13,7 @@ on:
1313
pull_request:
1414
branches:
1515
- main
16-
16+
- dev
1717
paths-ignore:
1818
- '**/*.md'
1919
- '**/*.txt'
@@ -39,17 +39,19 @@ jobs:
3939

4040
steps:
4141
- uses: actions/checkout@v6
42+
with:
43+
fetch-depth: 0
4244

4345
- name: Summary - Test execution started
4446
shell: pwsh
4547
run: |
4648
# Get Cmder version
4749
. scripts/utils.ps1
4850
$cmderVersion = Get-VersionStr
49-
50-
@"
51+
52+
$summary = @"
5153
## ✅ Run Tests - Workflow Summary
52-
54+
5355
### Test Environment
5456
| Property | Value |
5557
| --- | --- |
@@ -60,8 +62,10 @@ jobs:
6062
| Cmder Version | **$cmderVersion** |
6163
| PowerShell Version | **$($PSVersionTable.PSVersion)** |
6264
| Event | ``${{ github.event_name }}`` |
63-
64-
"@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
65+
66+
"@
67+
68+
$summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
6569
6670
- name: Initialize vendors
6771
shell: pwsh
@@ -74,7 +78,7 @@ jobs:
7478
run: |
7579
# Get vendor versions from sources.json
7680
$vendorInfo = @()
77-
$sources = Get-Content "sources.json" -Raw | ConvertFrom-Json
81+
$sources = Get-Content "vendor\sources.json" -Raw | ConvertFrom-Json
7882
$vendorDirs = $sources.PSObject.Properties | ForEach-Object { $_.Name }
7983
foreach ($dir in $vendorDirs) {
8084
$versionFile = "vendor/$dir/.cmderver"
@@ -83,35 +87,37 @@ jobs:
8387
$vendorInfo += "- **$dir**: $($version.Trim())"
8488
}
8589
}
86-
90+
8791
$summary = @"
8892
### ⚙️ Vendor Initialization
89-
93+
9094
✅ Vendor dependencies initialized successfully.
91-
95+
9296
**Vendor Versions:**
97+
"@
98+
9399
$(
94100
if ($vendorInfo.Count -eq 0) {
95-
"_No vendor version information available._"
101+
$summary += "_No vendor version information available._"
96102
} else {
97-
$vendorInfo -join "`n"
103+
$summary += $vendorInfo -join '`n'
98104
}
99105
)
100-
101-
"@
102-
106+
103107
$summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
104108
105109
- name: Summary - Test results table header
106110
if: success()
107111
shell: pwsh
108112
run: |
109-
@"
113+
$summary = @"
110114
### 📋 Test Results
111-
115+
112116
| Test | Status | Duration |
113117
| --- | --- | --- |
114-
"@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
118+
"@
119+
120+
$summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
115121
116122
- name: Testing Clink Shell
117123
id: test-clink
@@ -148,14 +154,16 @@ jobs:
148154
if: success()
149155
shell: pwsh
150156
run: |
151-
@"
152-
157+
$summary = @"
158+
153159
### ✅ All Tests Completed
154-
160+
155161
All shell environments tested successfully!
156-
162+
157163
**Test Coverage:**
158164
- ✅ Clink shell environment (Windows cmd.exe with Clink)
159165
- ✅ PowerShell environment (with Cmder profile)
160166
- ✅ Bash environment (Git Bash integration)
161-
"@ | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8
167+
"@
168+
169+
$summary | Add-Content -Path $env:GITHUB_STEP_SUMMARY -Encoding utf8

0 commit comments

Comments
 (0)