Release for Android #39
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: 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 | |
- name: Install JDK | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y openjdk-17-jdk-headless | |
sudo update-java-alternatives -a | |
java -version | |
- name: Install Flutter | |
run: | | |
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 }} |