target sdk level back #216
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: Android | |
on: push | |
jobs: | |
build-and-release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
flutter-version: '3.22.2' | |
- name: Find and Replace OpenAIP | |
uses: richardrigutins/replace-in-files@v2 | |
with: | |
files: '**/*.dart' | |
search-text: '@@___openaip_client_id__@@' | |
replacement-text: ${{ secrets.OPENAIP_CLIENT_ID }} | |
encoding: 'utf8' | |
max-parallelism: 10 | |
- name: Install project dependencies | |
run: flutter pub get | |
- name: Install project dependencies (realm) | |
run: dart run realm_dart install -t android | |
- name: Build APK | |
run: flutter build apk --release | |
- name: Sign APK with keystore | |
uses: r0adkll/sign-android-release@v1 | |
id: sign_apk | |
with: | |
releaseDirectory: build/app/outputs/apk/release | |
signingKeyBase64: ${{ secrets.KEY_STORE }} | |
alias: ${{ secrets.KEY_STORE_ALIAS }} | |
keyStorePassword: ${{ secrets.KEY_STORE_PASS }} | |
keyPassword: ${{ secrets.KEY_STORE_PASS }} | |
env: | |
BUILD_TOOLS_VERSION: "34.0.0" | |
- name: Build AAB | |
run: flutter build appbundle --release | |
- name: Sign AAB with keystore | |
uses: r0adkll/sign-android-release@v1 | |
id: sign_aab | |
with: | |
releaseDirectory: build/app/outputs/bundle/release | |
signingKeyBase64: ${{ secrets.KEY_STORE }} | |
alias: ${{ secrets.KEY_STORE_ALIAS }} | |
keyStorePassword: ${{ secrets.KEY_STORE_PASS }} | |
keyPassword: ${{ secrets.KEY_STORE_PASS }} | |
env: | |
BUILD_TOOLS_VERSION: "34.0.0" | |
- name: Upload release | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Android | |
path: | | |
${{steps.sign_apk.outputs.signedReleaseFile}} | |
${{steps.sign_aab.outputs.signedReleaseFile}} |