-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (63 loc) · 1.92 KB
/
build.yml
File metadata and controls
77 lines (63 loc) · 1.92 KB
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
74
75
76
77
name: Build Python IDE APK
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Clone Flutter SDK
run: |
cd /home/runner
git clone --depth 1 --branch stable https://github.com/flutter/flutter.git
- name: Add Flutter to PATH
run: echo "/home/runner/flutter/bin" >> $GITHUB_PATH
- name: Setup Flutter
run: |
flutter --version
flutter config --no-analytics
flutter precache
- name: Setup local.properties
run: |
echo "sdk.dir=$ANDROID_HOME" > android/local.properties
echo "flutter.sdk=/home/runner/flutter" >> android/local.properties
- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
~/.pub-cache
key: ${{ runner.os }}-flutter-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
${{ runner.os }}-flutter-
- name: Get dependencies
run: flutter pub get
- name: Build debug APK
run: flutter build apk --debug
- name: Build release APK
run: flutter build apk --release
- name: Upload debug APK
uses: actions/upload-artifact@v4
with:
name: debug-apk
path: build/app/outputs/flutter-apk/app-debug.apk
retention-days: 7
- name: Upload release APK
uses: actions/upload-artifact@v4
with:
name: release-apk
path: build/app/outputs/flutter-apk/app-release.apk
retention-days: 30
- name: Upload build logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: build-logs
path: |
build/logs/
android/.gradle/**/*.log
retention-days: 7