refactor(ci): unify build environment initialization
Gitea CI / Check code and tests (pull_request) Successful in 6m19s
Gitea CI / Build Windows x64 app (pull_request) Successful in 3m12s
Gitea CI / Build Android APK (pull_request) Successful in 3m39s
Gitea CI / Audit and package Windows x64 (pull_request) Successful in 1m4s
Gitea CI / Assemble and validate CI artifacts (pull_request) Successful in 50s
Gitea CI / Gitea CI passed (pull_request) Successful in 2s

This commit is contained in:
lingjhf committed 2026-10-06 17:58:03 +08:00
1 parent da98df00a8
commit 5a0ffa513c
4 files changed
+92 -46

No files matched your search

+13
View File
@@ -14,6 +14,19 @@ enabled for CI. Do not clear these caches between runs. Each job must have its o
checkout; do not share a Flutter `build/` or `.dart_tool/` directory between jobs.
With an ephemeral runner, these user directories must be persisted separately.
The local `prepare-flutter` action owns cache setup, Flutter version validation,
optional Java configuration and locked dependency resolution for the quality,
Android and Windows compilation jobs. `FLUTTER_VERSION` is declared once in the
CI workflow. The separate `prepare-windows-packaging` action owns the user .NET
installation and packaging tool setup, so packaging retries do not resolve
Flutter dependencies. Individual setup steps remain visible within each action.
Workflow-level environment variables contain only shared nonsecret settings.
The SDK token is limited to quality and platform compilation jobs. The fixed
Maven account name is set only on the Android build step, matching the SDK token
owner rather than the user who triggered CI. Assembly needs no SDK credentials;
Release credentials remain confined to the Release workflow's publishing jobs.
Build commands keep Flutter's default Pub preparation after the explicit locked
resolution. Do not use `--no-pub`: Flutter also regenerates release plugin
registrants in that preparation, removing dev-only plugins such as integration_test.