v2.1.3 #748
Workflow file for this run
This file contains hidden or 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: | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| native_libraries: | |
| name: Native libraries | |
| environment: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'true' | |
| - name: Setup Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Read Android NDK version | |
| run: | | |
| VERSION=$(cat .ndk-version) | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| - name: Setup Android NDK | |
| id: setup-ndk | |
| uses: nttld/setup-ndk@v1 | |
| with: | |
| ndk-version: ${{ env.VERSION }} | |
| add-to-path: false | |
| - name: Setup Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| rustflags: "" | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: 'stable' | |
| flutter-version-file: pubspec.yaml | |
| - name: Get dependencies | |
| run: | | |
| export PUB_CACHE=$HOME/.pub-cache | |
| flutter pub get | |
| - name: Build Isar | |
| run: | | |
| sudo apt-get install -y tofrodos | |
| fromdos .isar/tool/build_android.sh | |
| bash scripts/isar/fdroid_build_isar.sh x64 armv7 arm64 | |
| env: | |
| ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} | |
| - name: Build mimir | |
| run: bash scripts/mimir/fdroid_build_mimir.sh x64 armv7 arm64 | |
| 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 |