ci: only announce major and minor releases to Discord - #1393
Conversation
📝 WalkthroughWalkthroughThe Discord release workflow now classifies release tags, skips prereleases, and posts to Discord only for tags matching ChangesDiscord Release Announcement Gating
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
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/discord-release.yml:
- Around line 28-29: The semver check in the release workflow is too permissive
and can misclassify non-exact tags as major releases. Update the
version-matching condition in the Discord release workflow so the regex used in
the version classification branch is anchored at the end (or otherwise bounded)
to only accept exact X.Y.Z tags; this applies to the shell conditional that uses
BASH_REMATCH for the major-release path.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 749d693c-a935-4a89-9b0b-b8564b9d0e1e
📒 Files selected for processing (1)
.github/workflows/discord-release.yml
2e6fef5 to
adc037e
Compare
Gate the Discord announcement so it posts for major and minor releases (exact X.Y.0, no pre-release suffix). Skips patch releases and release candidates such as v3.0.0-rc.1 that GitHub does not flag as prereleases.
adc037e to
da73473
Compare
|
@DZakh Done, updated to announce major and minor releases (X.Y.0). Patches and prereleases are still skipped. Ready for another look. |
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/discord-release.yml:
- Around line 15-35: The release classification in the Discord workflow
currently treats any X.Y.0 tag as announceable, which conflicts with the
intended major-only behavior. Update the logic in the classify step so it only
sets announce=true for tags matching X.0.0 after stripping an optional leading
v, and keep prereleases excluded; also align the step name and inline comment to
reflect major-only release announcements. Use the existing classify step and
TAG/IS_PRERELEASE handling to locate the change.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 9917d692-b8ab-4565-8e86-c862b2816b95
📒 Files selected for processing (1)
.github/workflows/discord-release.yml
DZakh
left a comment
There was a problem hiding this comment.
Looks good! I won't need to delete alpha release anymore 😁
…get-redesign-yl7t1u Brings in the Discord-release CI workflow tweak (#1393); workflow-only, no code overlap with this branch. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0174BGgup49cCEGmFyBW7Wyx
Gates the release announcement workflow so it only posts to Discord for major and minor releases (exact
X.Y.0).v3.0.0-rc.1) are not flagged as prereleases on GitHub, so the tag is matched exactly (anchored, no suffix) rather than relying on the prerelease flagValidated against all 204 historical releases: 38 would post (down from 204), matching the major + minor set.
Summary by CodeRabbit
X.Y.0semver pattern (optionally prefixed withv), and only when there is no prerelease suffix.