ci: split into fast analyze + slow release build with path gating
analyze job runs on push/PR regardless of changed files (fast check). release-apk job only fires when Dart source, Android, pubspec, or tooling files change on push to master (slow build). workflow_dispatch triggers both jobs unconditionally. Doc-only pushes no longer trigger any CI run.
This commit is contained in:
@@ -3,6 +3,13 @@ name: CI
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
|
paths:
|
||||||
|
- 'lib/**.dart'
|
||||||
|
- 'test/**.dart'
|
||||||
|
- 'android/**'
|
||||||
|
- 'tool/**'
|
||||||
|
- 'pubspec.yaml'
|
||||||
|
- 'pubspec.lock'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@@ -15,7 +22,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
analyze:
|
analyze:
|
||||||
name: Analyze & Build
|
name: Analyze & Test
|
||||||
runs-on: flutter-android
|
runs-on: flutter-android
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -31,6 +38,16 @@ jobs:
|
|||||||
- name: Analyze
|
- name: Analyze
|
||||||
run: flutter analyze
|
run: flutter analyze
|
||||||
|
|
||||||
|
release-apk:
|
||||||
|
name: Release APK
|
||||||
|
runs-on: flutter-android
|
||||||
|
needs: [analyze]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Get dependencies
|
||||||
|
run: flutter pub get
|
||||||
|
|
||||||
- name: Build release APK
|
- name: Build release APK
|
||||||
run: flutter build apk --release
|
run: flutter build apk --release
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user