-
-
Notifications
You must be signed in to change notification settings - Fork 912
chore(releases): minor improvements to the release workflow #2764
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
Caution Review failedThe pull request is closed. WalkthroughThe Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
.github/workflows/release.yml (3)
33-46: Release summary extraction silently succeeds if section is missing.The sed command (
/^# Releases/,$p) will produce no output if the PR body lacks a "# Releases" header. While this may be acceptable for your workflow, consider whether empty step summaries on every Changesets PR is the desired behavior, or if you should add a check/validation.If you want explicit notification when the section is missing, consider:
- echo "$PR_BODY" | sed -n '/^# Releases/,$p' >> $GITHUB_STEP_SUMMARY + if echo "$PR_BODY" | grep -q '^# Releases'; then + echo "$PR_BODY" | sed -n '/^# Releases/,$p' >> $GITHUB_STEP_SUMMARY + else + echo "⚠️ No '# Releases' section found in PR body" >> $GITHUB_STEP_SUMMARY + fi
71-71: Clarify the conditional ref logic with explicit grouping.While the ternary expression works correctly, adding parentheses improves readability for future maintainers:
- ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ref || github.sha }} + ref: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.ref) || github.sha }}
73-79: Quote the ref variable in git commands for robustness.Unquoted variables in shell commands can cause parsing issues if they contain special characters, though unlikely for SHAs/tags/branches. Add quotes for safety:
- if ! git merge-base --is-ancestor ${{ github.event.inputs.ref }} origin/main; then + if ! git merge-base --is-ancestor "${{ github.event.inputs.ref }}" origin/main; thenApply this fix to both the release job (line 76) and prerelease job (line 151).
Additionally, for consistency, add an
ifcondition to the prerelease verification step (line 149) since the release job has one at line 74, even though the prerelease job itself is already gated by its job-level condition.Also applies to: 149-154
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/release.yml(4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (21)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (8, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (7, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (5, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (1, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (2, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (4, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (6, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (3, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (5, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (8, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (4, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (6, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (1, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (7, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (3, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (2, 8)
- GitHub Check: units / packages / 🧪 Unit Tests: Packages (1, 1)
- GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
- GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
- GitHub Check: typecheck / typecheck
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (1)
.github/workflows/release.yml (1)
18-21: Input refactoring looks good.The new
refinput cleanly replacesprerelease_refwith a clear description covering all use cases (branch, tag, or SHA).
Changes in this PR: