refactor(build): 统一本地与 CI 构建入口及平台发布工具 (#9)
Gitea CI / Check code and tests (push) Successful in 7m38s
Gitea CI / Build Android APK (push) Successful in 6m20s
Gitea CI / Audit and package Windows x64 (push) Canceled after 0s
Gitea CI / Assemble and validate CI artifacts (push) Canceled after 0s
Gitea CI / Gitea CI passed (push) Canceled after 0s
Gitea CI / Build Windows x64 app (push) Canceled after 14m42s

This commit was merged in pull request #9.
This commit is contained in:
lingjhf committed 2026-10-06 16:14:42 +00:00
1 parent a13a54d5ec
commit 4a759d81a6
61 files changed
+1913 -388

No files matched your search

+10 -15
View File
@@ -12,8 +12,8 @@ concurrency:
group: app-${{ gitea.ref }}
cancel-in-progress: true
env:
CI: 'true'
PYTHONUTF8: '1'
FLUTTER_VERSION: '3.47.5'
CUTDEX_GITEA_INTERNAL_URL: http://127.0.0.1:3000
GIT_CONFIG_COUNT: '2'
GIT_CONFIG_KEY_0: core.autocrlf
@@ -48,18 +48,13 @@ jobs:
- name: Prepare Flutter environment
uses: ./.gitea/actions/prepare-flutter
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
configure-java: 'true'
- name: Analyze Dart code
run: dart analyze --fatal-infos
run: python tool/check.py --suite analyze
- name: Run Flutter tests
run: flutter test --reporter expanded test packages/cutdex_ui/test packages/cutdex_native/test
- name: Test update and release tools
run: |
python -m unittest discover -s tool/gitea -p 'test_*.py'
if ($LASTEXITCODE -ne 0) { throw 'Release tooling tests failed.' }
python -m unittest discover -s tool/windows -p '*_unit.py'
if ($LASTEXITCODE -ne 0) { throw 'Update tooling tests failed.' }
run: python tool/check.py --suite flutter
- name: Check repository and tool tests
run: python tool/check.py --suite tools
android:
name: Build Android APK
@@ -77,7 +72,6 @@ jobs:
- name: Prepare Flutter environment
uses: ./.gitea/actions/prepare-flutter
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
configure-java: 'true'
- name: Configure Gradle memory and build cache
run: |
@@ -87,7 +81,10 @@ jobs:
- name: Build production Android APK
env:
GITEA_ACTOR: lingjhf
run: flutter build apk --release --flavor production --target-platform android-arm64,android-x64
run: |
Remove-Item Env:CUTDEX_ANDROID_PATH -ErrorAction SilentlyContinue
python tool/build.py android
if ($LASTEXITCODE -ne 0) { throw 'Android build failed.' }
- name: Upload Android CI artifact
if: ${{ needs.quality.outputs.package-app == 'true' }}
uses: ./.gitea/actions/upload-artifact
@@ -112,12 +109,10 @@ jobs:
github-server-url: ${{ env.CUTDEX_GITEA_INTERNAL_URL }}
- name: Prepare Flutter environment
uses: ./.gitea/actions/prepare-flutter
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
- name: Build production Windows app
run: |
Remove-Item Env:CUTDEX_WINDOWS_PATH, Env:CUTDEX_WINDOWS_PACKAGE_PATH -ErrorAction SilentlyContinue
flutter build windows --release --flavor production
python tool/build.py windows
if ($LASTEXITCODE -ne 0) { throw 'Windows build failed.' }
- name: Verify native SDK matches pinned packaging tools
run: |