גרסת GPT מתוקנת #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build "שמור וזכור" APK | |
on: | |
push: | |
branches: | |
- flet-build # או כל שם אחר של branch רלוונטי | |
jobs: | |
build-apk: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Install system dependencies (Linux) | |
if: runner.os == 'Linux' | |
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 "NDK_VERSION=27.2.12479018" >> $GITHUB_ENV | |
echo "SDK_VERSION=android-35" >> $GITHUB_ENV | |
echo "PATH=$ANDROID_SDK_ROOT/tools/bin:$PATH" >> $GITHUB_ENV | |
- name: Accept Android SDK licenses | |
run: yes | $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --licenses | |
- name: Install Android SDK components | |
run: | | |
$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --sdk_root=$ANDROID_SDK_ROOT --list | grep ndk | |
yes | $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --sdk_root=$ANDROID_SDK_ROOT --install "ndk;$NDK_VERSION" --channel=3 | |
yes | $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --sdk_root=$ANDROID_SDK_ROOT --install "platforms;$SDK_VERSION" | |
- name: Create and activate virtual environment | |
run: | | |
python3 -m venv .venv | |
source .venv/bin/activate | |
- name: Install Flet, Cython and dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install flet cython | |
pip install -r requirements.txt # התקנת תלויות ספציפיות לאפליקציה מקובץ requirements.txt | |
pip install git+https://github.com/flet-dev/[email protected] | |
- name: Build APK for "שמור וזכור" | |
run: | | |
flet build apk # בניית ה-APK | |
- name: Upload APK as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: שמור-וזכור-apk # שם קובץ ה-APK | |
path: build/apk/*.apk # נתיב לקובץ ה-APK |