File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 2727 steps :
2828 - uses : actions/checkout@v6
2929
30+ - name : Validate PublicAPI.Unshipped.txt files are empty
31+ shell : pwsh
32+ run : |
33+ $unshippedFiles = Get-ChildItem 'src/ ' -Recurse -Filter *.Unshipped.txt | Select -ExpandProperty FullName
34+
35+ $hasUnshippedAPIs = $false
36+
37+ foreach ($file in $unshippedFiles) {
38+ $content = Get-Content -Path $file -Raw
39+ # Remove the #nullable enable line and any whitespace
40+ $trimmedContent = $content -replace '^\s*#nullable enable\s*$', '' -replace '^\s+', ''
41+
42+ if ($trimmedContent -ne '') {
43+ Write-Error "❌ $file contains unshipped APIs. Please promote them to PublicAPI.Shipped.txt before releasing.`nContent:`n$content"
44+ $hasUnshippedAPIs = $true
45+ }
46+ }
47+
48+ if ($hasUnshippedAPIs) {
49+ exit 1
50+ }
51+
52+ Write-Output "✅ All PublicAPI.Unshipped.txt files are clean"
53+
3054 - name : Generate GitHub App token
3155 id : app-token
3256 uses : actions/create-github-app-token@v2
You can’t perform that action at this time.
0 commit comments