Skip to content

Build Apk manual workflow #3

Build Apk manual workflow

Build Apk manual workflow #3

Workflow file for this run

name: Build Apk manual workflow
on: workflow_dispatch
jobs:
build:
name: Build APK
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '17'
# Navigate to the submodule and perform the necessary git operations
- name: Update flutter submodule to stable branch
run: |
git submodule update --init --recursive
cd submodules/flutter
git reset --merge
git checkout stable
git pull origin stable
cd ../..
- run: submodules/flutter/bin/flutter pub get
- name: Run Flutter tests
run: submodules/flutter/bin/flutter test
- name: Set up signing config
run: |
echo "${{ secrets.ANDROID_KEY_BASE64 }}" | base64 -d - > upload-keystore.jks
echo "${{ secrets.ANDROID_PROPERTIES_BASE64 }}" | base64 -d - > key.properties
export X_KEYSTORE_PATH="$(pwd)/upload-keystore.jks"
echo "X_KEYSTORE_PATH=$X_KEYSTORE_PATH" >> $GITHUB_ENV
cp key.properties android/key.properties
- name: Bump new version
run: |
echo "${{ github.event.release.body }}" > changelog.temp
python bump_new_version.py ${{ github.event.release.tag_name }} changelog.temp
- name: Build APK
run: submodules/flutter/bin/flutter build apk --split-debug-info=./build-debug-files --flavor pro --release --split-per-abi
env:
X_KEYSTORE_PATH: ${{ env.X_KEYSTORE_PATH }}
- name: Build app bundle
run: |
submodules/flutter/bin/flutter build appbundle --obfuscate --split-debug-info=./build-debug-file --flavor free
submodules/flutter/bin/flutter build appbundle --obfuscate --split-debug-info=./build-debug-file --flavor pro