Skip to content

Build Android apk

Build Android apk #22

Workflow file for this run

name: Build Android apk
on:
[workflow_dispatch]
permissions:
contents: read
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: '3.16.x'
- run: curl https://textual.ru/presets.db -o assets/presets.db
- run: echo '{}' > lib/l10n/app_zh.arb
- run: flutter clean
- run: flutter pub get
- run: flutter test
- run: flutter build apk --flavor beta
- uses: noriban/sign-android-release@v5
name: Sign app APK
id: sign_app
with:
releaseDirectory: build/app/outputs/flutter-apk
signingKeyBase64: ${{ secrets.KEYSTORE_JKS }}
alias: github
keyStorePassword: ${{ secrets.KEYSTORE_PASSWORD }}
keyPassword: ${{ secrets.KEYSTORE_PASSWORD }}
- name: Rename APK
run: mv ${{steps.sign_app.outputs.signedReleaseFile}} build/app/outputs/flutter-apk/EveryDoor-$(git log -n 1 --format='%h').apk
- name: Archive APK
uses: actions/upload-artifact@v4
with:
name: everydoor-apk
path: build/app/outputs/flutter-apk/EveryDoor*.apk
retention-days: 60