Skip to content

Commit

Permalink
בניית APK אוטומטית
Browse files Browse the repository at this point in the history
  • Loading branch information
NHLOCAL committed Dec 17, 2024
1 parent faf0cc1 commit 3eb6213
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Build Shamor Vezachor Android APK

on:
push:
branches:
- android-build

jobs:
build-apk:
runs-on: ubuntu-latest

steps:
- name: Check out the repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential zlib1g-dev libncurses5-dev libffi-dev libssl-dev
- name: Set up Java (for Android)
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'

- name: Install Flutter SDK
uses: subosito/flutter-action@v2
with:
flutter-version: '3.24'
channel: 'stable'

- name: Set Android SDK environment variables
run: |
echo "ANDROID_SDK_ROOT=$HOME/Android/Sdk" >> $GITHUB_ENV
echo "PATH=$PATH:$HOME/Android/Sdk/cmdline-tools/latest/bin:$HOME/Android/Sdk/tools/bin" >> $GITHUB_ENV
- name: Accept Android SDK licenses
run: yes | $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --licenses

- name: Install Android SDK components
run: |
yes | $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --install "platforms;android-35" "build-tools;34.0.0" "ndk;27.2.12479018"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install cython
- name: Build APK
run: |
flet build apk --output build/apk -v
env:
PYTHONIOENCODING: utf-8
PYTHONUTF8: 1

- name: Upload APK as artifact
uses: actions/upload-artifact@v4
with:
name: shamor_vezachor_apk
path: build/apk/*.apk

0 comments on commit 3eb6213

Please sign in to comment.