Skip to content

Commit bef7454

Browse files
committed
fix: handle exit code 65 (warnings) in production-release validation
1 parent ed44a6a commit bef7454

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/production-release.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,24 @@ jobs:
220220
- name: 🔍 Validate package
221221
run: |
222222
echo "Running pub publish dry-run to validate package..."
223+
# Run dry-run and capture exit code
224+
# Exit code 65 = warnings only (acceptable, e.g., gitignored files)
225+
# Exit code 0 = success
226+
# Other exit codes = real errors
227+
set +e
223228
flutter pub publish --dry-run
229+
EXIT_CODE=$?
230+
set -e
231+
232+
if [ $EXIT_CODE -eq 0 ]; then
233+
echo "✅ Package validation passed with no warnings"
234+
elif [ $EXIT_CODE -eq 65 ]; then
235+
echo "⚠️ Package validation passed with warnings (acceptable)"
236+
echo "Warnings don't prevent publishing"
237+
else
238+
echo "❌ Package validation failed with exit code $EXIT_CODE"
239+
exit $EXIT_CODE
240+
fi
224241
225242
- name: 📝 Check pub.dev credentials
226243
run: |

0 commit comments

Comments
 (0)