feat: Add Android CI workflow for testing and building APKs

This commit is contained in:
mso7nueh
2026-02-27 12:10:43 +03:00
parent 24185cc875
commit 56fb2f1bac

View File

@@ -113,10 +113,21 @@ jobs:
uses: https://github.com/actions/checkout@v3
- name: Set up Flutter
uses: https://github.com/subosito/flutter-action@v2
with:
channel: ${{ env.flutter_channel }}
flutter-version: ${{ env.flutter_version }}
run: |
FLUTTER_DIR="${{ env.my_local_cache_dir }}flutter"
if [ ! -f "$FLUTTER_DIR/bin/flutter" ]; then
echo "Downloading Flutter ${{ env.flutter_version }}..."
curl -fsSL -o /tmp/flutter.tar.xz "https://storage.googleapis.com/flutter_infra_release/releases/${{ env.flutter_channel }}/linux/flutter_linux_${{ env.flutter_version }}-${{ env.flutter_channel }}.tar.xz"
echo "Extracting Flutter..."
mkdir -p "${{ env.my_local_cache_dir }}"
tar xf /tmp/flutter.tar.xz -C "${{ env.my_local_cache_dir }}"
rm /tmp/flutter.tar.xz
else
echo "Flutter already cached at $FLUTTER_DIR"
fi
echo "$FLUTTER_DIR/bin" >> $GITHUB_PATH
echo "$FLUTTER_DIR/bin/cache/dart-sdk/bin" >> $GITHUB_PATH
echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH
# - name: Print flutter-action outputs
# shell: bash
@@ -134,7 +145,9 @@ jobs:
- name: Fix dir permissions
run: |
git config --global --add safe.directory /opt/hostedtoolcache/flutter/${{ env.flutter_channel }}-${{ env.flutter_version }}-${{ steps.flutter-action.outputs.ARCHITECTURE }}
ARCH=$(uname -m)
if [ "$ARCH" = "x86_64" ]; then ARCH="x64"; fi
git config --global --add safe.directory "${{ env.my_local_cache_dir }}flutter"
flutter config --android-sdk="$ANDROID_HOME"
flutter doctor -v