ci(v3): skip nightly releases for bookkeeping-only changes - #5882
Conversation
WalkthroughThe nightly release workflow now selects a precise release baseline, excludes bookkeeping files from quick-change detection, and emits explicit eligibility statuses and reasons. ChangesNightly release detection
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant GitHub Actions
participant Git history and tags
participant Repository files
GitHub Actions->>Git history and tags: Select exact or active release baseline
GitHub Actions->>Repository files: Check unreleased changelog content when no baseline exists
Git history and tags->>Repository files: Compare release inputs
Repository files-->>GitHub Actions: Return eligible or bookkeeping-only changes
GitHub Actions-->>GitHub Actions: Emit status and reason outputs
Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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: 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/nightly-release-v3.yml:
- Around line 98-100: Update the exact-HEAD tag detection in the nightly release
workflow so CURRENT_TAG is assigned only when the tag matches the existing v3
release schema used by fallback selection. Preserve the current LATEST_TAG
assignment and logging for valid v3 tags, while allowing unrelated HEAD tags to
continue into pending v3 release-input handling.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: fbd221a0-e53e-4713-a14d-5ef4dc76193a
📒 Files selected for processing (1)
.github/workflows/nightly-release-v3.yml
| if CURRENT_TAG=$(git describe --tags --exact-match HEAD 2>/dev/null); then | ||
| LATEST_TAG="$CURRENT_TAG" | ||
| echo "Current commit has release tag: $LATEST_TAG" |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Limit the exact-HEAD baseline to valid v3 release tags.
Line 98 accepts any tag at HEAD. If an unrelated tag points at HEAD, it becomes LATEST_TAG, the diff is empty, and the workflow skips pending v3 release inputs. Filter exact tags with the same v3 release schema used for fallback selection.
Proposed fix
- if CURRENT_TAG=$(git describe --tags --exact-match HEAD 2>/dev/null); then
+ CURRENT_TAG=$(
+ git tag --points-at HEAD --format='%(refname:short)' |
+ grep -E '^v3\.0\.0($|-(alpha2|beta|rc)\.[0-9]+$)' |
+ sort -V |
+ tail -1
+ )
+ if [ -n "$CURRENT_TAG" ]; then📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if CURRENT_TAG=$(git describe --tags --exact-match HEAD 2>/dev/null); then | |
| LATEST_TAG="$CURRENT_TAG" | |
| echo "Current commit has release tag: $LATEST_TAG" | |
| CURRENT_TAG=$( | |
| git tag --points-at HEAD --format='%(refname:short)' | | |
| grep -E '^v3\.0\.0($|-(alpha2|beta|rc)\.[0-9]+$)' | | |
| sort -V | | |
| tail -1 | |
| ) | |
| if [ -n "$CURRENT_TAG" ]; then | |
| LATEST_TAG="$CURRENT_TAG" | |
| echo "Current commit has release tag: $LATEST_TAG" |
🤖 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/nightly-release-v3.yml around lines 98 - 100, Update the
exact-HEAD tag detection in the nightly release workflow so CURRENT_TAG is
assigned only when the tag matches the existing v3 release schema used by
fallback selection. Preserve the current LATEST_TAG assignment and logging for
valid v3 tags, while allowing unrelated HEAD tags to continue into pending v3
release-input handling.
There was a problem hiding this comment.
Pull request overview
Updates the v3 nightly release workflow’s “no-change” gate so that release bookkeeping-only commits (e.g., changelog/version metadata updates) do not trigger additional nightly beta/RC releases. The workflow now compares master against the latest active v3 prerelease tag and ignores a specific set of bookkeeping files when deciding whether there are “release inputs”.
Changes:
- Replaces the “UNRELEASED_CHANGELOG.md implies release” shortcut with a tag-based baseline check.
- Uses
git diff --quiet <latest-tag>..HEADwhile excluding version/changelog/runtime package metadata files to detect real release inputs. - Improves the “no previous release” behavior by gating eligibility on unreleased changelog content.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| CHANGE_COUNT=$(git rev-list "${LATEST_TAG}..HEAD" --count) | ||
| echo "Found release inputs in $CHANGE_COUNT commits since $LATEST_TAG" | ||
| echo "has_changes=true" >> $GITHUB_OUTPUT |
Fixes the nightly no-change gate.
The previous workflow treated any UNRELEASED_CHANGELOG.md content as sufficient to release, so auto-generated release bookkeeping could create an additional beta without new release inputs.
This change compares master with the latest active beta/RC tag and ignores only release bookkeeping files: the version file, unreleased changelog, published changelog, and runtime package version metadata. Real source, docs, workflow, and runtime changes still trigger a release.
Validated against the actual beta.2 release commit: bookkeeping-only changes are skipped, while the real beta.1-to-beta.2 change set still triggers release.
Summary by CodeRabbit