Skip to content

v0.15.2 - Bugfixes

v0.15.2 - Bugfixes #66

Workflow file for this run

name: Build and push Flutter App
on:
release:
types: [ published ]
jobs:
build-app:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Write Keystore file 🗄️
id: android_keystore
uses: timheuer/[email protected]
with:
fileName: key.jks
encodedString: ${{ secrets.KEYSTORE }}
- name: Write Keystore properties 🗝️
run: |
echo "storeFile=${{ steps.android_keystore.outputs.filePath }}" > android/key.properties
echo "storePassword=${{ secrets.SIGNING_STORE_PASSWORD }}" >> android/key.properties
echo "keyPassword=${{ secrets.SIGNING_KEY_PASSWORD }}" >> android/key.properties
echo "keyAlias=${{ secrets.SIGNING_KEY_ALIAS }}" >> android/key.properties
- name: Setup Java ☕
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: "17.x"
cache: 'gradle'
- name: Setup Flutter 📱
uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: '3.10.0'
- name: Opt out of telemetry
run: flutter --disable-telemetry
- name: Install dependencies 📦
run: flutter pub get
- name: Generate Localizations 🌐
run: flutter gen-l10n
- name: Build Android App (Multiple APKs) - GMS variant 📱
run: flutter build apk --split-per-abi --dart-define=app.flavor=gms
- name: Build Android App (fat APK) - GMS variant 📱
run: flutter build apk --dart-define=app.flavor=gms
- name: Rename files
run: |
cd build/app/outputs/flutter-apk &&
mv app-release.apk locus-universal-gms.apk &&
mv app-arm64-v8a-release.apk locus-arm64-gms.apk &&
mv app-armeabi-v7a-release.apk locus-armeabi-gms.apk &&
mv app-x86_64-release.apk locus-x86-gms.apk
- name: Upload APKs 🚀
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
files: 'build/app/outputs/flutter-apk/*.apk'
- name: Clean Flutter
run: flutter clean
- name: Update pubspec.yaml for FLOSS variant 📝
run: sed -i -e 's/^#f//' pubspec.yaml
- name: Update android/app/build.gradle for FLOSS variant 📝
run: sed -i -e 's/^\/\/f //' android/app/build.gradle
- name: Update android/app7src/main/AndroidManifest.xml for FLOSS variant 📝
run: sed -i -e '/<!-- GMS -->/{N;d;}' android/app/src/main/AndroidManifest.xml
- name: Install dependencies 📦
run: flutter pub get
- name: Generate Localizations 🌐
run: flutter gen-l10n
- name: Build Android App (Multiple APKs) - FLOSS variant 📱
run: flutter build apk --split-per-abi --dart-define=app.flavor=floss
- name: Build Android App (fat APK) - FLOSS variant 📱
run: flutter build apk --dart-define=app.flavor=floss
- name: Rename files 📝
run: |
cd build/app/outputs/flutter-apk &&
mv app-release.apk locus-universal-floss.apk &&
mv app-arm64-v8a-release.apk locus-arm64-floss.apk &&
mv app-armeabi-v7a-release.apk locus-armeabi-floss.apk &&
mv app-x86_64-release.apk locus-x86-floss.apk
- name: Upload APKs 🚀
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
files: 'build/app/outputs/flutter-apk/*.apk'