feat: implement automated CI/CD release pipeline - #8
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds a tag-triggered release workflow that version-bumps the app manifest, builds MSIX and installer artifacts, and publishes a GitHub Release with both outputs. It also switches the MSIX packaging script to dotnet publish and adds a new Inno Setup installer definition. ChangesRelease Pipeline
Estimated code review effort: 2 (Simple) | ~12 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (2)
installer.iss (2)
31-32: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueRedundant explicit file entry.
Line 31 explicitly includes
{#MyAppExeName}, but line 32's recursive wildcardpublish_output\*already covers it. Not harmful, but redundant duplication.♻️ Proposed simplification
[Files] -Source: "publish_output\{`#MyAppExeName`}"; DestDir: "{app}"; Flags: ignoreversion Source: "publish_output\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@installer.iss` around lines 31 - 32, Remove the redundant explicit Source entry for {`#MyAppExeName`} in installer.iss, since the recursive publish_output\* rule already includes it. Keep the broader Source: "publish_output\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs entry and delete the duplicate file line to avoid duplicated packaging behavior.
8-21: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winDeclare x64-compatible install mode
installer.issis publishing a win-x64 app, but Setup will still default to 32-bit mode. AddArchitecturesAllowed=x64compatibleandArchitecturesInstallIn64BitMode=x64compatibleso{autopf}resolves to the 64-bit Program Files path and the installer stays aligned with the package architecture.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@installer.iss` around lines 8 - 21, The Setup section in installer.iss is missing the x64-compatible architecture settings, so the installer may default to 32-bit behavior even for a win-x64 package. Update the [Setup] block by adding ArchitecturesAllowed and ArchitecturesInstallIn64BitMode with x64compatible so DefaultDirName using {autopf} resolves to the 64-bit Program Files path and matches the app architecture.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/release.yml:
- Around line 15-16: The checkout step in the release workflow is leaving the
GitHub token persisted in the repo config; update the existing actions/checkout
usage in the release job to set persist-credentials to false so the token is not
stored for the rest of the job. Make this change on the Checkout Code step only,
since no later git push is needed, and keep the rest of the release flow
unchanged.
- Around line 23-53: The release workflow is interpolating `github.ref_name` and
`env.VERSION` directly into PowerShell scripts, which risks template injection
in the `Extract version from tag`, `Update AppxManifest Version`, `Find MSIX`,
and `Compile Inno Setup` steps. Update those `run:` blocks to read values from
PowerShell environment variables like `$env:VERSION` instead of `${{ ... }}`
expansion, and keep the version extraction confined to setting `GITHUB_ENV` so
later steps consume the already-exported value safely.
In `@installer.iss`:
- Around line 27-28: The startup task is currently enabled by default in the
installer task list, unlike the desktop icon option. Update the startup task
entry in the installer task definition so it behaves as an opt-in choice, and
confirm the task symbol for the Windows startup option is configured
consistently with desktopicon by adding the same unchecked-style default
behavior if that is intended.
---
Nitpick comments:
In `@installer.iss`:
- Around line 31-32: Remove the redundant explicit Source entry for
{`#MyAppExeName`} in installer.iss, since the recursive publish_output\* rule
already includes it. Keep the broader Source: "publish_output\*"; DestDir:
"{app}"; Flags: ignoreversion recursesubdirs createallsubdirs entry and delete
the duplicate file line to avoid duplicated packaging behavior.
- Around line 8-21: The Setup section in installer.iss is missing the
x64-compatible architecture settings, so the installer may default to 32-bit
behavior even for a win-x64 package. Update the [Setup] block by adding
ArchitecturesAllowed and ArchitecturesInstallIn64BitMode with x64compatible so
DefaultDirName using {autopf} resolves to the 64-bit Program Files path and
matches the app architecture.
🪄 Autofix (Beta)
✅ Autofix completed
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 3af889e0-5e57-4ef1-8cda-9f37a6088622
📒 Files selected for processing (3)
.github/workflows/release.ymlbuild-msix.ps1installer.iss
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Fixes Applied SuccessfullyFixed 1 file(s) based on 3 unresolved review comments. Files modified:
Commit: The changes have been pushed to the Time taken:
Lines 14–19 steps:
- name: Checkout Code
uses: actions/checkout@v7
+ with:
+ persist-credentials: false
- name: Setup .NET
uses: actions/setup-dotnet@v5Lines 23–35 - name: Extract version from tag
id: get_version
run: |
- $version = "${{ github.ref_name }}".TrimStart('v')
+ $version = "$env:GITHUB_REF_NAME".TrimStart('v')
echo "VERSION=$version" >> $env:GITHUB_ENV
- name: Update AppxManifest Version
run: |
$manifest = [xml](Get-Content "Package.appxmanifest")
- $manifest.Package.Identity.Version = "${{ env.VERSION }}.0"
+ $manifest.Package.Identity.Version = "$env:VERSION.0"
$manifest.Save("Package.appxmanifest")
- name: Build MSIXLines 39–45 run: |
$msix = Get-ChildItem -Path bin/Release -Filter *.msix -Recurse | Select-Object -First 1
if ($msix) {
- Copy-Item $msix.FullName "DuskControl.v${{ env.VERSION }}.msix"
+ Copy-Item $msix.FullName "DuskControl.v$env:VERSION.msix"
} else {
Write-Error "MSIX package not found."
exit 1Lines 50–56
- name: Compile Inno Setup
run: |
- & "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" installer.iss "/dAppVersion=${{ env.VERSION }}"
+ & "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" installer.iss "/dAppVersion=$env:VERSION"
- name: Release
uses: softprops/action-gh-release@v3 |
Fixed 1 file(s) based on 3 unresolved review comments. Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Summary by CodeRabbit
Summary of changes
New Features
Bug Fixes