gitea workflow for automated building
Some checks failed
Flutter APK Build / Build Flutter APK (push) Failing after 3m23s
Some checks failed
Flutter APK Build / Build Flutter APK (push) Failing after 3m23s
This commit is contained in:
50
.gitea/workflows/android_build.yml
Normal file
50
.gitea/workflows/android_build.yml
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
name: Flutter APK Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_apk:
|
||||||
|
name: Build Flutter APK
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup Java
|
||||||
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '11'
|
||||||
|
|
||||||
|
- name: Setup Flutter
|
||||||
|
uses: subosito/flutter-action@v2
|
||||||
|
with:
|
||||||
|
flutter-version: 'latest'
|
||||||
|
channel: 'stable'
|
||||||
|
|
||||||
|
- name: Get dependencies
|
||||||
|
run: flutter pub get
|
||||||
|
|
||||||
|
- name: Format code
|
||||||
|
run: flutter format --set-exit-if-changed .
|
||||||
|
|
||||||
|
- name: Analyze code
|
||||||
|
run: flutter analyze .
|
||||||
|
|
||||||
|
- name: Build APK
|
||||||
|
run: flutter build apk --release
|
||||||
|
|
||||||
|
- name: Upload APK artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: flutter-apk
|
||||||
|
path: build/app/outputs/flutter-apk/app-release.apk
|
||||||
|
retention-days: 30
|
||||||
Reference in New Issue
Block a user