Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds a tag-triggered GitHub Actions release workflow that builds Injector.exe for Win32, x64, and ARM64 and produces an unsigned bundle and draft release, plus a PowerShell script and documentation to download, EV-sign, repackage, and publish the final signed release locally. Changes
Sequence DiagramsequenceDiagram
participant Dev as Developer
participant Git as Git/GitHub
participant GHA as GitHub Actions
participant Build as MSBuild
participant API as GitHub API
participant Local as Local Machine
participant SignTool as SignTool
Dev->>Git: Push tag (e.g., v1.5.0)
Git->>GHA: Trigger release workflow
rect rgba(100,150,200,0.5)
Note over GHA,Build: Build Stage (matrix: Win32, x64, ARM64)
GHA->>GHA: Checkout code
GHA->>GHA: Setup MSBuild
loop per platform
GHA->>Build: Build Injector.sln (Release, platform)
Build-->>GHA: Injector.exe
GHA->>GHA: Verify & upload platform artifact
end
end
rect rgba(150,100,200,0.5)
Note over GHA,API: Package & Release Stage
GHA->>GHA: Download platform artifacts
GHA->>GHA: Assemble release dirs and copy binaries
GHA->>GHA: Create unsigned ZIP bundle
GHA->>GHA: Upload unsigned bundle artifact
GHA->>API: Create draft GitHub release
API-->>GHA: Draft release created
end
rect rgba(200,150,100,0.5)
Note over Dev,SignTool: Local Finalization (manual on EV machine)
Dev->>Local: Run finalize-release.ps1 -Tag -CertificateSubjectName
Local->>API: Query workflow runs / download unsigned artifact
API-->>Local: Return unsigned bundle
Local->>Local: Extract binaries
loop per platform binary
Local->>SignTool: Sign binary (signtool via wdkwhere)
SignTool-->>Local: Signed binary
end
Local->>Local: Repackage signed ZIP
Local->>API: Upload signed ZIP to release and optionally publish
API-->>Dev: Release published
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
scripts/finalize-release.ps1 (2)
66-66: Consider checking$LASTEXITCODEafter gh CLI commands.The script checks
$LASTEXITCODEaftersigntool(line 89) but not afterghcommands. Ifgh run downloadfails with a non-zero exit code without writing to stderr,$ErrorActionPreference = "Stop"may not catch it.Example pattern
gh run download $run.databaseId -n $artifactName -D $downloadDir | Out-Null + if ($LASTEXITCODE -ne 0) { + throw "gh run download failed with exit code $LASTEXITCODE." + }Consider applying this pattern to other
ghcalls (lines 97, 133, 134, 138) for robust error handling.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@scripts/finalize-release.ps1` at line 66, Add explicit exit-code checks after every gh CLI invocation (for example the gh run download call and other gh calls around the variables artifactName/downloadDir and the subsequent gh commands) similar to how signtool is validated: after each gh ... call, test $LASTEXITCODE and, if non-zero, write an error message to the console (including the command and exit code) and exit with that code; ensure you apply the same pattern to the other gh calls referenced in the review to make failure handling deterministic.
9-9: Consider using HTTPS for the timestamp URL.The default timestamp URL uses
http://which transmits data unencrypted. DigiCert supports HTTPS for their timestamp service.Proposed fix
- [string]$TimestampUrl = "http://timestamp.digicert.com", + [string]$TimestampUrl = "https://timestamp.digicert.com",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@scripts/finalize-release.ps1` at line 9, Update the timestamp URL string to use HTTPS instead of HTTP by changing the $TimestampUrl variable assignment (look for the [string]$TimestampUrl declaration) so the timestamping uses "https://timestamp.digicert.com"; ensure any code that consumes $TimestampUrl continues to work with the new scheme (no additional behavioral changes required).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/release.yml:
- Around line 36-39: The script uses Write-Error with Test-Path to check
$source, which produces a non-terminating error and allows execution to continue
(leading to a confusing Copy-Item failure); change the error handling so the
check for Test-Path triggers a terminating error (for example replace the
Write-Error call with throw or use -ErrorAction Stop) when $source is missing,
ensuring the workflow halts immediately and surfaces a clear failure message
referencing $source.
---
Nitpick comments:
In `@scripts/finalize-release.ps1`:
- Line 66: Add explicit exit-code checks after every gh CLI invocation (for
example the gh run download call and other gh calls around the variables
artifactName/downloadDir and the subsequent gh commands) similar to how signtool
is validated: after each gh ... call, test $LASTEXITCODE and, if non-zero, write
an error message to the console (including the command and exit code) and exit
with that code; ensure you apply the same pattern to the other gh calls
referenced in the review to make failure handling deterministic.
- Line 9: Update the timestamp URL string to use HTTPS instead of HTTP by
changing the $TimestampUrl variable assignment (look for the
[string]$TimestampUrl declaration) so the timestamping uses
"https://timestamp.digicert.com"; ensure any code that consumes $TimestampUrl
continues to work with the new scheme (no additional behavioral changes
required).
Summary by CodeRabbit