Update build.yml #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | ||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
jobs: | ||
build_android: | ||
runs-on: ubuntu-latest | ||
container: | ||
# trying to be close to the f-droid build to detect failures early | ||
image: registry.gitlab.com/fdroid/fdroidserver:buildserver-bullseye | ||
env: | ||
ANDROID_HOME: /opt/android-sdk | ||
steps: | ||
- name: apt update | ||
run: sudo apt update | ||
- name: Install jq | ||
run: sudo apt install jq | ||
- name: Install xz-utils | ||
run: sudo apt install xz-utils | ||
- name: Install Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: '3.10.5' | ||
channel: 'stable' | ||
cache: true | ||
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash | ||
- run: git config --global --add safe.directory ${{ env.FLUTTER_ROOT }} | ||
- run: flutter config --no-analytics | ||
- run: flutter --version | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
- name: Build Android APK | ||
run: flutter build apk | ||
- name: Upload Android apk | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Android apk | ||
path: ./build/app/outputs/flutter-apk/app-release.apk |