-
Notifications
You must be signed in to change notification settings - Fork 5
50 lines (42 loc) · 1.08 KB
/
build.yml
File metadata and controls
50 lines (42 loc) · 1.08 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
name: Build APK
on:
pull_request:
branches:
- development
push:
branches:
- development
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: app
steps:
- name: Set up Repository
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.35.7"
channel: "stable"
- name: Get dependencies
run: flutter pub get
- name: Ensure Build Script is Executable
run: chmod +x build.sh
- name: Run Build Script
shell: bash
run: |
./build.sh --init
./build.sh --build --production --debug
- name: Verify APK Exists
run: |
if [ ! -f "build/app/outputs/flutter-apk/app-debug.apk" ]; then
echo "APK not found! Build failed."
exit 1
fi
- name: Upload APK Artifact
uses: actions/upload-artifact@v4
with:
name: app-apk
path: app/build/app/outputs/flutter-apk/app-debug.apk