Build Android apk #25
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 Android apk | |
on: | |
[workflow_dispatch] | |
permissions: | |
contents: read | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'adopt' | |
- run: echo '{}' > lib/l10n/app_zh.arb | |
- run: vendor/flutter/bin/flutter clean | |
- run: vendor/flutter/bin/flutter pub get | |
- run: curl -L https://textual.ru/presets.db -o assets/presets.db | |
name: Download presets database | |
- run: vendor/flutter/bin/flutter test | |
- run: vendor/flutter/bin/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 |