-
Notifications
You must be signed in to change notification settings - Fork 24
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
ci: release on discord only stable versions #194
Conversation
📝 WalkthroughWalkthroughThe changes in this pull request modify the GitHub Actions workflow for releasing to Discord by introducing a conditional statement in the job Changes
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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
🧹 Outside diff range and nitpick comments (1)
.github/workflows/release-to-discord.yaml (1)
7-7
: Consider adding documentation about version filtering.To improve maintainability, consider adding a comment explaining the version filtering logic and providing examples of which tags will/won't trigger Discord notifications.
jobs: github-releases-to-discord: + # Only notify Discord for stable releases (e.g., v1.0.0) + # Pre-release versions with hyphens (e.g., v1.0.0-beta.1) are skipped if: "! contains(github.event.release.tag_name, '-')"
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (1)
.github/workflows/release-to-discord.yaml
(1 hunks)
🔇 Additional comments (1)
.github/workflows/release-to-discord.yaml (1)
7-7
: LGTM! Let's verify the condition works as expected.
The condition effectively filters out pre-release versions by checking for hyphens in the tag name, which aligns with semantic versioning conventions.
Let's verify the tag naming patterns in the repository:
✅ Verification successful
✅ Condition correctly filters pre-release versions
The release history confirms that the condition ! contains(github.event.release.tag_name, '-')
will work as intended:
- It will skip pre-release versions (v13.0.0-rc7, v13.0.0-rc6, etc.)
- It will allow stable releases (v12.0.0, v11.0.0)
This perfectly aligns with the repository's versioning pattern where:
- Stable releases use format: vX.Y.Z
- Pre-releases use format: vX.Y.Z-rcN
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check existing tag patterns to ensure the condition matches the intended behavior
# Test: List all tags and their patterns
git tag | sort -V
# Test: Specifically check for any tags with hyphens that would be filtered
git tag | grep "-" || echo "No tags with hyphens found"
Length of output: 101
Script:
#!/bin/bash
# Let's check the release history to understand the version patterns
gh release list --limit 10
Length of output: 566
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.
utACK
Summary by CodeRabbit