Skip to content

Build Flutter Client (Android) #29

Build Flutter Client (Android)

Build Flutter Client (Android) #29

Workflow file for this run

name: Build Flutter Client (Android)
on:
# pull:
# branches: [main]
workflow_dispatch:
jobs:
Build-Client:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./client
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: 3.27.1
- run: flutter pub get
# Build Android
- run: flutter build apk
- run: flutter build appbundle
# Sign Android
- name: Setup build tool version variable
shell: bash
run: |
BUILD_TOOL_VERSION=$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1)
echo "BUILD_TOOL_VERSION=$BUILD_TOOL_VERSION" >> $GITHUB_ENV
echo Last build tool version is: $BUILD_TOOL_VERSION
- uses: r0adkll/sign-android-release@v1
name: Sign app APK
id: sign_apk
with:
releaseDirectory: client/build/app/outputs/flutter-apk
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOL_VERSION }}
# - uses: r0adkll/sign-android-release@v1
# name: Sign app AAB
# # ID used to access action output
# id: sign_aab
# with:
# releaseDirectory: client/build/app/outputs/bundle/release
# signingKeyBase64: ${{ secrets.SIGNING_KEY }}
# alias: ${{ secrets.ALIAS }}
# keyStorePassword: ${{ secrets.KEY_PASSWORD }}
# keyPassword: ${{ secrets.KEY_PASSWORD }}
# env:
# BUILD_TOOLS_VERSION: "30.0.2"
- uses: actions/upload-artifact@v3
with:
name: vTablet_client_apk
path: client/build/app/outputs/flutter-apk/app-release.apk
- uses: actions/upload-artifact@v3
with:
name: vTablet_client_aab
path: client/build/app/outputs/bundle/release/app-release.aab
- uses: actions/upload-artifact@v3
with:
name: vTablet_client_apk_signed
path: ${{steps.sign_apk.outputs.signedReleaseFile}}