Skip to content

Commit 19accc9

Browse files
authored
Create build.yml
1 parent 2fe4d2b commit 19accc9

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/build.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build APK
2+
3+
on:
4+
push:
5+
workflow_dispatch:
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- uses: subosito/flutter-action@v2
14+
with:
15+
flutter-version: '3.24.0'
16+
channel: 'stable'
17+
18+
- name: Regenerate platform folders
19+
run: flutter create . --project-name echo_status
20+
21+
- name: Add internet permission
22+
run: |
23+
sed -i 's/<manifest/<manifest xmlns:android="http:\/\/schemas.android.com\/apk\/res\/android"/' android/app/src/main/AndroidManifest.xml
24+
sed -i '/<manifest/a\ <uses-permission android:name="android.permission.INTERNET"\/>' android/app/src/main/AndroidManifest.xml
25+
26+
- run: flutter pub get
27+
28+
- name: Generate Hive adapters
29+
run: dart run build_runner build --delete-conflicting-outputs
30+
31+
- name: Build APK
32+
run: flutter build apk --release
33+
34+
- name: Upload APK
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: app-release
38+
path: build/app/outputs/flutter-apk/app-release.apk

0 commit comments

Comments
 (0)