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,11 +3,15 @@ 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 ]
|
||||||
# Manual trigger. Worth having on a self-hosted runner: when a run fails for
|
|
||||||
# reasons outside the repo — the runner was down, a toolchain changed — this
|
|
||||||
# re-runs it without an empty commit to force one.
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
# Both jobs target a self-hosted runner, by capability rather than by hostname.
|
# Both jobs target a self-hosted runner, by capability rather than by hostname.
|
||||||
@@ -47,6 +51,7 @@ jobs:
|
|||||||
release-apk:
|
release-apk:
|
||||||
name: Release APK
|
name: Release APK
|
||||||
runs-on: flutter-android
|
runs-on: flutter-android
|
||||||
|
needs: [analyze]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user