diff --git a/.gitea/workflows/build-android.yml b/.gitea/workflows/build-android.yml index 96ae212..ca1157b 100644 --- a/.gitea/workflows/build-android.yml +++ b/.gitea/workflows/build-android.yml @@ -1,13 +1,11 @@ name: Build Android APK on: + # Release tags only — building the ~100 MB APK on every master push + # burned Gitea runner minutes without producing a useful artifact. + # Use workflow_dispatch for on-demand dev builds. push: - branches: [master] tags: ['v*'] - paths: - - 'android/**' - - 'server/src/ledgrab/**' - - '.gitea/workflows/build-android.yml' workflow_dispatch: inputs: version: @@ -97,10 +95,16 @@ jobs: - name: Link Python source (junction equivalent) run: | + set -euo pipefail # Chaquopy reads Python modules from android/app/src/main/python/ - # On Windows dev machines this is a directory junction; on Linux CI use a symlink. + # On Windows dev machines this is a directory junction; on Linux + # CI use a symlink. The parent dir is .gitignore'd (the junction + # target is the real content), so we have to create it first. + mkdir -p android/app/src/main/python ln -sfn "$(pwd)/server/src/ledgrab" android/app/src/main/python/ledgrab ls -la android/app/src/main/python/ + # Sanity check — readlink resolves the link and the directory exists. + test -d android/app/src/main/python/ledgrab - name: Decode signing keystore id: keystore