v1.x.x #338
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: pull_request | |
permissions: | |
contents: write | |
jobs: | |
build_android: | |
name: Android | |
environment: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
flutter-version-file: pubspec.yaml | |
- name: Add keystore | |
run: echo "${{ secrets.ANDROID_KEYSTORE }}" | base64 -d > android/localmaterialnotes_keystore.jks | |
- name: Add key properties | |
run: echo "${{ secrets.ANDROID_KEY_PROPERTIES }}" > android/key.properties | |
- name: Build app | |
run: | | |
dart run build_runner build | |
flutter gen-l10n | |
flutter build apk --release | |
- name: Archive APK | |
uses: actions/upload-artifact@v4 | |
with: | |
name: LocalMaterialNotes | |
path: build/app/outputs/flutter-apk/app-release.apk |