Skip to content

Commit c38f5ea

Browse files
enedclaude
andcommitted
fix: Replace manual melos setup with official melos-action
Remove custom melos bootstrap commands and use the official bluefireteam/melos-action@v3 across all workflows. This action: - Properly handles Flutter/Dart SDK detection - Automatically activates melos and runs bootstrap - Is the recommended approach for federated plugins - Used by major Flutter projects like FlutterFire This should resolve the melos bootstrap issues in CI by using the battle-tested official action instead of manual commands. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 24714c7 commit c38f5ea

File tree

3 files changed

+7
-69
lines changed

3 files changed

+7
-69
lines changed

.github/workflows/analysis.yml

Lines changed: 1 addition & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -13,53 +13,7 @@ jobs:
1313
with:
1414
channel: "stable"
1515
cache: true
16-
- name: Verify Flutter and Dart are available
17-
run: |
18-
flutter --version
19-
dart --version
20-
- name: Setup dependencies manually
21-
run: |
22-
# First, create overrides for all packages
23-
echo "Creating dependency overrides for all packages..."
24-
25-
# workmanager_platform_interface (no dependencies on other packages)
26-
cd workmanager_platform_interface
27-
flutter pub get
28-
cd ..
29-
30-
# workmanager_android (depends on platform_interface)
31-
cd workmanager_android
32-
cat > pubspec_overrides.yaml << 'EOF'
33-
dependency_overrides:
34-
workmanager_platform_interface:
35-
path: ../workmanager_platform_interface
36-
EOF
37-
flutter pub get
38-
cd ..
39-
40-
# workmanager_ios (depends on platform_interface)
41-
cd workmanager_ios
42-
cat > pubspec_overrides.yaml << 'EOF'
43-
dependency_overrides:
44-
workmanager_platform_interface:
45-
path: ../workmanager_platform_interface
46-
EOF
47-
flutter pub get
48-
cd ..
49-
50-
# workmanager (depends on all packages)
51-
cd workmanager
52-
cat > pubspec_overrides.yaml << 'EOF'
53-
dependency_overrides:
54-
workmanager_platform_interface:
55-
path: ../workmanager_platform_interface
56-
workmanager_android:
57-
path: ../workmanager_android
58-
workmanager_ios:
59-
path: ../workmanager_ios
60-
EOF
61-
flutter pub get
62-
cd ..
16+
- uses: bluefireteam/melos-action@v3
6317
- uses: axel-op/dart-package-analyzer@v3
6418
with:
6519
githubToken: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/format.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,9 @@ jobs:
4646
with:
4747
channel: 'stable'
4848

49+
- uses: bluefireteam/melos-action@v3
4950
- name: publish checks
5051
run: |
51-
dart pub global activate melos
52-
melos bootstrap
5352
cd workmanager_platform_interface
5453
flutter pub publish -n
5554
cd ../workmanager_android

.github/workflows/test.yml

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@ jobs:
1515
with:
1616
channel: 'stable'
1717
cache: true
18-
- name: Install melos
19-
run: dart pub global activate melos
20-
- name: Bootstrap packages
21-
run: melos bootstrap --sdk-path auto
18+
- uses: bluefireteam/melos-action@v3
2219
- name: Test
2320
run: |
2421
cd workmanager
@@ -32,10 +29,7 @@ jobs:
3229
with:
3330
channel: 'stable'
3431
cache: true
35-
- name: Install melos
36-
run: dart pub global activate melos
37-
- name: Bootstrap packages
38-
run: melos bootstrap --sdk-path auto
32+
- uses: bluefireteam/melos-action@v3
3933
- name: Build iOS App
4034
run: cd example && flutter build ios --debug --no-codesign
4135
- name: Run native iOS tests
@@ -53,10 +47,7 @@ jobs:
5347
with:
5448
channel: 'stable'
5549
cache: true
56-
- name: Install melos
57-
run: dart pub global activate melos
58-
- name: Bootstrap packages
59-
run: melos bootstrap --sdk-path auto
50+
- uses: bluefireteam/melos-action@v3
6051
- name: Build Android App
6152
run: cd example && flutter build apk --debug
6253
- name: Run native Android tests
@@ -81,10 +72,7 @@ jobs:
8172
- uses: futureware-tech/simulator-action@v3
8273
with:
8374
model: '${{ matrix.device }}'
84-
- name: Install melos
85-
run: dart pub global activate melos
86-
- name: Bootstrap packages
87-
run: melos bootstrap --sdk-path auto
75+
- uses: bluefireteam/melos-action@v3
8876
# Run flutter integrate tests
8977
- name: Run Flutter integration tests
9078
run: cd example && flutter test integration_test/workmanager_integration_test.dart
@@ -114,10 +102,7 @@ jobs:
114102
with:
115103
channel: 'stable'
116104
cache: true
117-
- name: Install melos
118-
run: dart pub global activate melos
119-
- name: Bootstrap packages
120-
run: melos bootstrap --sdk-path auto
105+
- uses: bluefireteam/melos-action@v3
121106
- name: Run Flutter Driver tests
122107
uses: reactivecircus/android-emulator-runner@v2
123108
with:

0 commit comments

Comments
 (0)