-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (60 loc) · 2.54 KB
/
build-android.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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