Skip to content

Release for Android #40

Release for Android

Release for Android #40

name: Release for Android
on:
workflow_dispatch:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
env:
PROPERTIES_PATH: "./android/key.properties"
jobs:
build_apk:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Install Flutter
run: |
java -version
git submodule update --init --recursive
- name: Prepare Flutter Dependencies
run: |
.flutter/bin/flutter config --no-analytics
.flutter/bin/flutter pub get
- name: Signing APK
run: |
echo keyPassword=\${{ secrets.SIGNING_PASSWORD }} > ${{env.PROPERTIES_PATH}}
echo storePassword=\${{ secrets.SIGNING_PASSWORD }} >> ${{env.PROPERTIES_PATH}}
echo keyAlias=\${{ secrets.SIGNING_ALIAS }} >> ${{env.PROPERTIES_PATH}}
echo storeFile=key.jks >> ${{env.PROPERTIES_PATH}}
echo "${{ secrets.SIGNING_KEY }}" | base64 --decode > android/app/key.jks
- name: Build APK
run: .flutter/bin/flutter build apk --split-per-abi
- name: Release
uses: softprops/action-gh-release@v1
with:
files: >
build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk,
build/app/outputs/flutter-apk/app-arm64-v8a-release.apk,
build/app/outputs/flutter-apk/app-x86_64-release.apk
prerelease: false
tag_name: ${{ github.event.inputs.tag_name }}
token: ${{ secrets.RELEASE_TOKEN }}