ci: Refactor release workflow to use bump PR instead of direct push to main#110
ci: Refactor release workflow to use bump PR instead of direct push to main#110
Conversation
…o main Closes #109 Splits the release process into two workflows to avoid direct pushes to `main`, which were blocked by branch protection rules. `versioning.yml` now creates a bump branch, builds pre-built firmware in parallel, commits all changes (version files, blueprint, binaries) to the bump branch, and opens a PR with auto-merge enabled. `release.yml` triggers when the bump PR merges and handles tagging, GitHub Release creation, floating tag updates, and Discord notification.
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 8 minutes and 59 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe changes refactor the CI/CD release pipeline by splitting it into two separate workflows: versioning.yml now creates a version-bump PR with metadata, while a new release.yml workflow handles tag creation and GitHub releases separately. Additionally, prebuilt manifest files are removed and their corresponding YAML configurations are updated to use the floating Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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.
🧹 Nitpick comments (1)
.github/workflows/release.yml (1)
72-74: Consider edge case: special characters in PR title.The
grep 'original_title:'pattern could theoretically match multiple lines if the PR body itself contains that string. However, since the bump PR body is constructed programmatically byversioning.ymland the original PR body follows after the-->marker, this is unlikely in practice. The fallback on lines 78-82 provides reasonable resilience.🔧 Optional: More robust extraction using awk
- ORIGINAL_TITLE=$(echo "$PR_BODY" \ - | grep 'original_title:' \ - | sed 's/original_title: //') + ORIGINAL_TITLE=$(echo "$PR_BODY" \ + | awk '/^<!-- release-meta/,/^-->/' \ + | grep 'original_title:' \ + | sed 's/original_title: //' \ + | head -1)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/release.yml around lines 72 - 74, The current extraction for ORIGINAL_TITLE using grep 'original_title:' and sed can mis-handle cases with multiple matches or special characters; update the extraction logic for ORIGINAL_TITLE so it only captures the first occurrence and preserves arbitrary characters in the title (including colons, dashes, and HTML markers) by switching to a single-pass, robust parser (e.g., use awk or a shell read that finds the first line matching 'original_title:' and returns the full remainder of that line) and ensure the code path that assigns ORIGINAL_TITLE exits after the first match; update the block that currently uses grep 'original_title:' and sed 's/original_title: //' to the new single-pass approach so later fallback handling remains correct.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.github/workflows/release.yml:
- Around line 72-74: The current extraction for ORIGINAL_TITLE using grep
'original_title:' and sed can mis-handle cases with multiple matches or special
characters; update the extraction logic for ORIGINAL_TITLE so it only captures
the first occurrence and preserves arbitrary characters in the title (including
colons, dashes, and HTML markers) by switching to a single-pass, robust parser
(e.g., use awk or a shell read that finds the first line matching
'original_title:' and returns the full remainder of that line) and ensure the
code path that assigns ORIGINAL_TITLE exits after the first match; update the
block that currently uses grep 'original_title:' and sed 's/original_title: //'
to the new single-pass approach so later fallback handling remains correct.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d9eda27b-548d-407c-a07e-990d7a5f581a
⛔ Files ignored due to path filters (8)
prebuilt/nspanel-esp32/nspanel-esp32.factory.binis excluded by!**/*.binprebuilt/nspanel-esp32/nspanel-esp32.ota.binis excluded by!**/*.binprebuilt/nspanel_esphome_prebuilt.binis excluded by!**/*.binprebuilt/nspanel_esphome_prebuilt.factory.binis excluded by!**/*.binprebuilt/wall-display-esp32/wall-display-esp32.factory.binis excluded by!**/*.binprebuilt/wall-display-esp32/wall-display-esp32.ota.binis excluded by!**/*.binprebuilt/wall_display.binis excluded by!**/*.binprebuilt/wall_display.factory.binis excluded by!**/*.bin
📒 Files selected for processing (12)
.github/workflows/release.yml.github/workflows/versioning.ymlprebuilt/nspanel-esp32/manifest.jsonprebuilt/nspanel_esphome_prebuilt.bin.md5prebuilt/nspanel_esphome_prebuilt.factory.bin.md5prebuilt/nspanel_esphome_prebuilt.manifest.jsonprebuilt/nspanel_esphome_prebuilt.yamlprebuilt/wall-display-esp32/manifest.jsonprebuilt/wall_display.bin.md5prebuilt/wall_display.factory.bin.md5prebuilt/wall_display.manifest.jsonprebuilt/wall_display.yaml
💤 Files with no reviewable changes (8)
- prebuilt/wall_display.factory.bin.md5
- prebuilt/nspanel_esphome_prebuilt.factory.bin.md5
- prebuilt/nspanel-esp32/manifest.json
- prebuilt/wall_display.manifest.json
- prebuilt/nspanel_esphome_prebuilt.manifest.json
- prebuilt/nspanel_esphome_prebuilt.bin.md5
- prebuilt/wall-display-esp32/manifest.json
- prebuilt/wall_display.bin.md5
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Closes #109
Splits the release process into two workflows to avoid direct pushes to
main, which were blocked by branch protection rules.versioning.ymlnow creates a bump branch, builds pre-built firmware in parallel, commits all changes (version files, blueprint, binaries) to the bump branch, and opens a PR with auto-merge enabled.release.ymltriggers when the bump PR merges and handles tagging, GitHub Release creation, floating tag updates, and Discord notification.Summary by CodeRabbit