chore: Automatize version releasing#44
Conversation
- Added official platform installers for macOS, Windows, and Linux, with automated builds included in the release process. - Updated CHANGELOG to reflect new features and improvements for version 0.8.0. - Enhanced Makefile to include new packaging targets for macOS, Windows, and Linux installers. - Introduced packaging scripts for creating native installers across platforms. - Bumped version to 0.8.0 in backend and UI configurations.
|
Warning Review limit reached
Next review available in: 48 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds cross-platform packaging scripts, Makefile packaging targets, and a release workflow that builds installers, uploads artifacts, and drafts GitHub releases. Also bumps version files and updates changelog and repo documentation. ChangesPackaging and Release Automation
Estimated code review effort: 3 (Moderate) | ~30 minutes Sequence Diagram(s)sequenceDiagram
participant GitHub as GitHub Actions
participant Build as build job
participant Makefile as Makefile targets
participant Scripts as packaging scripts
participant Release as release job
participant GH as GitHub Releases
GitHub->>Build: push to main with version files changed
Build->>Makefile: run package-macos/package-linux/package-windows
Makefile->>Scripts: execute platform packaging scripts
Scripts-->>Build: installer artifacts in dist/
Build->>GitHub: upload artifacts per OS
GitHub->>Release: start release job
Release->>Release: parse Version from backend/version/version.go
Release->>GitHub: download artifacts into dist/
Release->>GH: create draft v<version> release with dist/* attached
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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: 4
🧹 Nitpick comments (1)
.github/workflows/release.yml (1)
95-102: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winReplace the third-party release action with
gh release.The runner already provides the GitHub CLI, so this adds another release dependency for the same job.
♻️ Proposed refactor
- - name: Create GitHub release - uses: softprops/action-gh-release@v2 - with: - tag_name: v${{ steps.version.outputs.version }} - name: Calf ${{ steps.version.outputs.version }} - draft: true - generate_release_notes: true - files: dist/* + - name: Create GitHub release + env: + GH_TOKEN: ${{ github.token }} + run: | + gh release create "v${{ steps.version.outputs.version }}" dist/* \ + --draft \ + --generate-notes \ + --title "Calf ${{ steps.version.outputs.version }}"🤖 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 @.github/workflows/release.yml around lines 95 - 102, Replace the `softprops/action-gh-release@v2` step in the release workflow with a GitHub CLI-based release command using `gh release` in the same job. Keep the existing release inputs from the `Create GitHub release` step in `.github/workflows/release.yml` by mapping the version output from `steps.version.outputs.version`, preserving the release name, draft status, notes generation, and attaching `dist/*` artifacts through the CLI flow.Source: Linters/SAST tools
🤖 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 `@CHANGELOG.md`:
- Around line 8-12: The CHANGELOG entry is too focused on release mechanics;
rewrite the bullet under the 0.8.0 entry to describe the user-visible outcome
instead. Update the wording in CHANGELOG.md so it emphasizes that users can now
download official macOS, Windows, and Linux installers from releases, and avoid
mentioning how they are built or when they are published.
In `@scripts/package-linux.sh`:
- Around line 136-143: The appimagetool fetch in the package-linux.sh script is
using a moving “continuous” URL and can leave a corrupted partial download
behind, so update the download logic around the appimagetool variable to use a
pinned AppImageKit release URL and download into a temporary file before moving
it into place. After the download, verify the file is complete (ideally with a
checksum) before chmod and reuse, so subsequent runs do not execute a truncated
binary.
- Around line 75-118: The build_rpm() helper is deleting the user’s default RPM
workspace by removing the hardcoded rpmbuild directory under HOME. Update the
RPM build flow to use a project-local top directory instead, and pass it to
rpmbuild via a custom _topdir definition so the spec, SOURCES, BUILD, RPMS, and
SRPMS paths stay isolated. Keep the existing build_rpm() structure, but replace
the HOME-based directory handling with a local temp/project directory and make
the copy step read from that location.
In `@scripts/package-windows.ps1`:
- Around line 6-22: The version helpers Get-ProjectVersion and
Get-FlutterVersion currently dereference $match.Matches before checking whether
Select-String returned a match, which can trigger a null-valued expression error
instead of the intended custom message. Update both functions to first verify
the Select-String result is not $null before accessing Matches.Groups[1].Value,
and keep the existing throw message path in the no-match case.
---
Nitpick comments:
In @.github/workflows/release.yml:
- Around line 95-102: Replace the `softprops/action-gh-release@v2` step in the
release workflow with a GitHub CLI-based release command using `gh release` in
the same job. Keep the existing release inputs from the `Create GitHub release`
step in `.github/workflows/release.yml` by mapping the version output from
`steps.version.outputs.version`, preserving the release name, draft status,
notes generation, and attaching `dist/*` artifacts through the CLI flow.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: cba7221d-6933-4626-bb0c-78bf1af8c65a
📒 Files selected for processing (11)
.cursor/rules/calf.mdc.github/workflows/release.ymlCHANGELOG.mdCLAUDE.mdMakefilebackend/version/version.goscripts/_common.shscripts/package-linux.shscripts/package-macos.shscripts/package-windows.ps1ui/pubspec.yaml
- Revised CHANGELOG to clarify the availability of official platform installers for macOS, Windows, and Linux. - Modified release workflow to utilize the GitHub CLI for creating releases, enhancing automation. - Improved Linux packaging script to ensure proper checksum verification for appimagetool. - Added error handling in Windows packaging script for version extraction from configuration files.
- Added context support for graceful shutdown of the API server in the test setup. - Improved test server initialization by encapsulating the server creation and shutdown logic.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 95-103: The Create GitHub release step in the release workflow
uses steps.version.outputs.version directly in a shell command, so add a
version-format validation in the Extract version/related version-handling logic
before gh release create is invoked. Ensure the value produced by the version
extraction step is constrained to the expected semantic version pattern in
backend/version/version.go or the version output plumbing, and fail early if it
contains anything unexpected; then keep the Create GitHub release step consuming
only the validated version output.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 44c2e876-de39-4a03-95fa-4dac33947dd1
📒 Files selected for processing (5)
.github/workflows/release.ymlCHANGELOG.mdbackend/test/api/api_test.goscripts/package-linux.shscripts/package-windows.ps1
✅ Files skipped from review due to trivial changes (1)
- CHANGELOG.md
🚧 Files skipped from review as they are similar to previous changes (2)
- scripts/package-linux.sh
- scripts/package-windows.ps1
- Implemented a check to ensure the version format follows semantic versioning (X.Y.Z) in the release workflow. - Added error handling to exit the process with an error message if the version format is invalid.
Summary by CodeRabbit
make package-*targets).