anyway/.gitea/workflows/build-android.yaml
2024-05-04 12:24:16 +02:00

39 lines
1.1 KiB
YAML

on: push
name: Test, Build and Release apk
jobs:
build:
name: Build APK
runs-on: k8s
steps:
- name: Install prerequisites
run: |
sudo apt-get update
sudo apt-get install -y xz-utils unzip
- uses: actions/checkout@v4
- uses: https://github.com/actions/setup-java@v4
with:
java-version: '17'
distribution: 'zulu'
- uses: https://github.com/subosito/flutter-action@v2
with:
channel: stable
flutter-version: 3.19.6
cache: true
- run: flutter config --no-cli-animations
- name: Setup Android SDK
uses: https://github.com/android-actions/setup-android@v3
- run: flutter pub get -v
# - run: flutter test
- run: flutter build apk --debug --split-per-abi
# - name: setup go # gitea release action requires go
# uses: https://github.com/actions/setup-go@v4
# with:
# go-version: '>=1.20.1'
# - name: Push APK to Releases
# uses: https://gitea.com/actions/release-action@main
# with:
# files: |-
# build/app/outputs/**.apk
# api_key: '${{secrets.RELEASE_TOKEN}}'