@@ -181,7 +181,6 @@ jobs:
181181 name : Build iOS
182182 needs : test
183183 runs-on : macos-14
184- if : github.ref == 'refs/heads/main' && github.event_name == 'push'
185184 steps :
186185 - uses : actions/checkout@v6
187186 with :
@@ -242,6 +241,7 @@ jobs:
242241
243242 - name : Upload iOS artifact
244243 uses : actions/upload-artifact@v7
244+ if : github.ref == 'refs/heads/main' && github.event_name == 'push'
245245 with :
246246 name : ios-build
247247 path : build/ios/iphoneos/Runner.app
@@ -251,7 +251,6 @@ jobs:
251251 name : Build macOS
252252 needs : test
253253 runs-on : macos-14
254- if : github.ref == 'refs/heads/main' || github.event_name == 'pull_request'
255254 steps :
256255 - uses : actions/checkout@v6
257256 with :
@@ -347,7 +346,6 @@ jobs:
347346 name : Build Android
348347 needs : test
349348 runs-on : ubuntu-latest
350- if : github.ref == 'refs/heads/main' && github.event_name == 'push'
351349 steps :
352350 - uses : actions/checkout@v6
353351 with :
@@ -406,6 +404,7 @@ jobs:
406404
407405 - name : Upload Android artifact
408406 uses : actions/upload-artifact@v7
407+ if : github.ref == 'refs/heads/main' && github.event_name == 'push'
409408 with :
410409 name : android-apk
411410 path : build/app/outputs/flutter-apk/app-release.apk
@@ -415,7 +414,6 @@ jobs:
415414 name : Build Linux
416415 needs : test
417416 runs-on : ubuntu-latest
418- if : github.ref == 'refs/heads/main' && github.event_name == 'push'
419417 steps :
420418 - uses : actions/checkout@v6
421419 with :
@@ -471,6 +469,7 @@ jobs:
471469
472470 - name : Upload Linux artifact
473471 uses : actions/upload-artifact@v7
472+ if : github.ref == 'refs/heads/main' && github.event_name == 'push'
474473 with :
475474 name : linux-build
476475 path : build/linux/x64/release/bundle
@@ -480,7 +479,6 @@ jobs:
480479 name : Build Windows
481480 needs : test
482481 runs-on : windows-latest
483- if : github.ref == 'refs/heads/main' && github.event_name == 'push'
484482 steps :
485483 - uses : actions/checkout@v6
486484 with :
@@ -532,6 +530,7 @@ jobs:
532530
533531 - name : Upload Windows artifact
534532 uses : actions/upload-artifact@v7
533+ if : github.ref == 'refs/heads/main' && github.event_name == 'push'
535534 with :
536535 name : windows-build
537536 path : build\windows\x64\runner\Release
0 commit comments