@ondeinference / onde / commits / e346152

Fix Dart release: restore tree before dry-run publish

flutter pub publish --dry-run runs pub get internally, which on Flutter 3.44+ rewrites analysis_options.yaml. The existing restore step ran after pub get but before the dry-run, leaving the tree dirty again when the dry-run's internal pub get fired. Add a second restore right before the dry-run step. Co-Authored-By: siGit Code <noreply@sigit.si>

Seto Elkahfi committed Sep 5, 2026 at 17:33 UTC e3461520a9006daf6c920bfc398a96d50c4721bc
1 file changed +7
.github/workflows/release-sdk-dart.yml
+7
@@ -90,6 +90,13 @@ jobs:
90 # does not cover the frb_generated.dart/ directory structure.
91 run: flutter analyze --no-fatal-infos
92
93 + # flutter pub publish --dry-run runs pub get internally, which on newer
94 + # Flutter (3.44+) rewrites analysis_options.yaml. Restore the tree right
95 + # before the dry-run so pub publish sees a clean git state.
96 + - name: Restore tree before dry-run
97 + working-directory: sdk/dart
98 + run: git checkout -- . 2>/dev/null || true
99 +
100 - name: Dry-run publish
101 working-directory: sdk/dart
102 run: flutter pub publish --dry-run