-
-
Notifications
You must be signed in to change notification settings - Fork 214
ci: Fix auto-release #1071
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: Fix auto-release #1071
Conversation
|
🚀 Thanks for opening this pull request! |
📝 WalkthroughWalkthroughReplaces manual dispatch trigger with push-on-tag triggers and adds logic to derive package and tag values from Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1071 +/- ##
=======================================
Coverage 43.46% 43.46%
=======================================
Files 61 61
Lines 3587 3587
=======================================
Hits 1559 1559
Misses 2028 2028 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/release-publish.yml(5 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). (2)
- GitHub Check: Test Flutter 3.38, macOS
- GitHub Check: Test Flutter 3.38, Windows
🔇 Additional comments (3)
.github/workflows/release-publish.yml (3)
18-22: Environment variable derivation logic is sound.The tag extraction and package detection correctly handle both push-triggered and workflow_call-triggered scenarios. The
||operator properly prioritizes inputs for manual triggers while falling back togithub.ref_namefor push events. Since job conditionals guard when jobs run, the resolved tags are guaranteed to be non-empty when jobs execute.
25-25: Job conditionals correctly implement dual-trigger support.Each conditional (
inputs.X != '' || startsWith(github.ref_name, 'X-')) properly allows jobs to run for either manual workflow_call invocations or pushed tags. This maintains backward compatibility while enabling the new push-on-tag automation.Also applies to: 53-53, 89-89, 112-112
34-34: Checkout refs properly use resolved tag values.All checkout steps now reference the environment variables
dart_tag_resolvedandflutter_tag_resolved, ensuring the correct commit/tag is checked out for both trigger paths. Combined with the conditional guards, these refs will never be empty when jobs execute.Also applies to: 62-62, 97-97, 120-120
| - "dart-[0-9]+.[0-9]+.[0-9]+*" | ||
| - "flutter-[0-9]+.[0-9]+.[0-9]+*" |
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.
Fix glob patterns in push trigger—they don't match semantic version tags.
The patterns dart-[0-9]+.[0-9]+.[0-9]+* and flutter-[0-9]+.[0-9]+.[0-9]+* use glob syntax where + and . are literal characters, not quantifiers. These patterns will only match tags like dart-0+.0+.0abc, not semantic versions like dart-1.2.3. This prevents the trigger from firing and breaks auto-release.
In glob patterns, [0-9] matches a single digit, and * matches zero or more of any character. To match semantic versions, use:
dart-[0-9].[0-9].[0-9]*(matches one digit per part; loose)- Or simply
dart-*(permissive, relies on conditional checks elsewhere)
Apply this diff to fix the glob patterns:
push:
tags:
- - "dart-[0-9]+.[0-9]+.[0-9]+*"
- - "flutter-[0-9]+.[0-9]+.[0-9]+*"
+ - "dart-[0-9]*.[0-9]*.[0-9]*"
+ - "flutter-[0-9]*.[0-9]*.[0-9]*"📝 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.
| - "dart-[0-9]+.[0-9]+.[0-9]+*" | |
| - "flutter-[0-9]+.[0-9]+.[0-9]+*" | |
| - "dart-[0-9]*.[0-9]*.[0-9]*" | |
| - "flutter-[0-9]*.[0-9]*.[0-9]*" |
🤖 Prompt for AI Agents
.github/workflows/release-publish.yml lines 5-6: the push trigger glob patterns
use regex-like `+` and literal `.` which don't match semantic version tags;
replace the two entries so they match typical tag names (for example use either
`dart-[0-9].[0-9].[0-9]*` and `flutter-[0-9].[0-9].[0-9]*` to loosely match
semver or simply `dart-*` and `flutter-*` for a permissive match), updating both
lines accordingly.
|
🎉 This change has been released in version 9.3.0 |
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.