2 Commits
test1 ... test3

Author SHA1 Message Date
Hermes Agent
94418c9edb ci: discover latest Android command-line tools dynamically
All checks were successful
Android build / build (push) Successful in 11m52s
Android build / build (release) Successful in 10m41s
2026-08-29 11:38:46 -05:00
Hermes Agent
f7377406df ci: attach release AAB to Gitea release assets
All checks were successful
Android build / build (push) Successful in 11m20s
Android build / build (release) Successful in 8m30s
2026-08-29 10:24:00 -05:00

View File

@@ -1,5 +1,9 @@
name: Android build name: Android build
permissions:
contents: read
releases: write
on: on:
push: push:
branches: branches:
@@ -33,7 +37,9 @@ jobs:
export ANDROID_HOME="$ANDROID_SDK_ROOT" export ANDROID_HOME="$ANDROID_SDK_ROOT"
mkdir -p "$ANDROID_SDK_ROOT/cmdline-tools" mkdir -p "$ANDROID_SDK_ROOT/cmdline-tools"
if [ ! -x "$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager" ]; then if [ ! -x "$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager" ]; then
curl -fsSL -o /tmp/commandlinetools.zip https://dl.google.com/android/repository/commandlinetools-linux-12266719_latest.zip tools_url="$(curl -fsSL https://developer.android.com/studio | grep -o 'https://dl.google.com/android/repository/commandlinetools-linux-[0-9][0-9]*_latest.zip' | head -n 1)"
test -n "$tools_url"
curl -fsSL -o /tmp/commandlinetools.zip "$tools_url"
rm -rf "$ANDROID_SDK_ROOT/cmdline-tools/latest" "$ANDROID_SDK_ROOT/cmdline-tools/cmdline-tools" rm -rf "$ANDROID_SDK_ROOT/cmdline-tools/latest" "$ANDROID_SDK_ROOT/cmdline-tools/cmdline-tools"
unzip -q /tmp/commandlinetools.zip -d "$ANDROID_SDK_ROOT/cmdline-tools" unzip -q /tmp/commandlinetools.zip -d "$ANDROID_SDK_ROOT/cmdline-tools"
mv "$ANDROID_SDK_ROOT/cmdline-tools/cmdline-tools" "$ANDROID_SDK_ROOT/cmdline-tools/latest" mv "$ANDROID_SDK_ROOT/cmdline-tools/cmdline-tools" "$ANDROID_SDK_ROOT/cmdline-tools/latest"
@@ -82,10 +88,17 @@ jobs:
path: app/build/outputs/apk/debug/*.apk path: app/build/outputs/apk/debug/*.apk
if-no-files-found: error if-no-files-found: error
- name: Upload release AAB - name: Attach release AAB to Gitea release
if: github.event_name == 'release' if: github.event_name == 'release'
uses: actions/upload-artifact@v3 env:
with: GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
name: release-aab shell: bash
path: app/build/outputs/bundle/release/*.aab run: |
if-no-files-found: error set -euxo pipefail
release_id="$(python3 -c 'import json, os; print(json.load(open(os.environ["GITHUB_EVENT_PATH"], encoding="utf-8"))["release"]["id"])')"
aab="$(find app/build/outputs/bundle/release -name '*.aab' | head -n 1)"
curl --fail-with-body \
--request POST \
--header "Authorization: token ${GITEA_TOKEN}" \
--form "attachment=@${aab}" \
"${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}/releases/${release_id}/assets?name=$(basename "$aab")"