diff --git a/.forgejo/workflows/android.yml b/.forgejo/workflows/android.yml index ab86392..dfe0f68 100644 --- a/.forgejo/workflows/android.yml +++ b/.forgejo/workflows/android.yml @@ -173,6 +173,41 @@ jobs: apksigner="$(ls /opt/android-sdk/build-tools/*/apksigner | head -1)" "$apksigner" verify --print-certs "app/build/outputs/apk/release/app-release.apk" + # Staged with a STABLE name plus the sidecar the server reads its version + # out of — an APK keeps that in a binary manifest Python cannot parse, and + # `aapt` is not on a Quart server. Computed here, where the real values are + # already known. + - name: Stage the client for distribution + if: steps.build.outputs.keystore != '' + run: | + mkdir -p dist + cp "app/build/outputs/apk/release/app-release.apk" dist/thoughtsync.apk + size="$(wc -c < dist/thoughtsync.apk | tr -d ' ')" + sha="$(sha256sum dist/thoughtsync.apk | cut -d' ' -f1)" + cat > dist/thoughtsync-android.json <&2 + echo "ERROR: nothing to publish — no desktop bundles under $BUNDLE_ROOT and no APK under $REPO_ROOT/android/dist." >&2 exit 1 fi echo "==> Publishing release $TAG with ${#ASSETS[@]} asset(s):" @@ -113,7 +121,7 @@ fi echo "==> Creating release for $TAG" BODY=$(cat <