From 1c9b702c5459444298a64586e4c2ec1ddacaa1cb Mon Sep 17 00:00:00 2001 From: lingjhf Date: Tue, 6 Oct 2026 03:19:09 +0800 Subject: [PATCH] Document release setup and limit Android memory for parallel CI --- .gitea/README.md | 26 ++++++++++++++++++++++++++ .gitea/workflows/ci.yml | 5 +++++ 2 files changed, 31 insertions(+) create mode 100644 .gitea/README.md diff --git a/.gitea/README.md b/.gitea/README.md new file mode 100644 index 0000000..bdd7ea1 --- /dev/null +++ b/.gitea/README.md @@ -0,0 +1,26 @@ +# Gitea Windows and Android builds + +The Windows x64 host runner needs Flutter 3.47.5, Python, Node, Visual Studio C++, +JDK 21 and Android SDK 36. The native cutdex_windows Release and cutdex_android +Maven packages must be published before building this app. The SDK Git dependency +is pinned to Gitea; the runner account needs SSH access to that private repository. + +Set CUTDEX_GITEA_TOKEN in repository Actions Secrets with repository read and +package read access. It authenticates private Gitea native package downloads. +The Android APK includes ARM64 and x86_64, uses the production flavor and currently +uses the project's debug signing configuration. Configure formal signing before +shipping a production signed Android release. The Windows ZIP includes the whole +Flutter Release directory and passes the PE dependency audit. Processing workers +and optional models are separate; these four repositories contain no worker bundle. + +PR/main CI analyzes and tests the app, builds both platforms, and uploads +cutdex-release-packages including SHA256SUMS and a release manifest. Protect main +with `Gitea CI / Gitea CI passed (pull_request)`. + +After main CI succeeds, create v at that exact commit. The Release +workflow downloads the existing CI artifact, requires both APK and Windows ZIP, +checks their digests, uploads to a draft Release, verifies remote bytes, then +publishes it. It refuses to overwrite a published Release. A manual dispatch with +the existing tag can retry an interrupted draft publication. The built-in GITEA_TOKEN +handles release writes and Actions artifact reads; no separate release-write PAT +is required. Do not commit credentials or keystores. diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 7f0520a..17df5ff 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -38,6 +38,11 @@ jobs: - run: flutter pub get --enforce-lockfile - run: dart analyze --fatal-infos - run: flutter test --reporter expanded + - name: Bound Android build memory on the shared runner + run: | + $file = 'android/gradle.properties' + $properties = [IO.File]::ReadAllText($file).Replace('-Xmx8G', '-Xmx3G').Replace('MaxMetaspaceSize=4G', 'MaxMetaspaceSize=768m') + [IO.File]::WriteAllText($file, $properties + "`norg.gradle.workers.max=4`n") - run: flutter build apk --release --flavor production --target-platform android-arm64,android-x64 - run: flutter build windows --release --flavor production - run: python -m pip install pefile==2024.8.26