Skip to content

minsdk = 23

minsdk = 23 #309

Workflow file for this run

name: Build and Release
on:
push:
jobs:
build_apk:
name: Build Release APK
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 0
- uses: actions/setup-java@v1
with:
java-version: "20.x"
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: flutter-actions/setup-flutter@v4
with:
channel: stable
version: 3.32.8
- run: flutter pub get
- name: Install CMake 3.18.1 via sdkmanager
run: |
yes | "${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager" --sdk_root="${ANDROID_SDK_ROOT}" --install "cmake;3.18.1"
- name: Set cmake.dir in local.properties
run: |
echo "cmake.dir=$ANDROID_SDK_ROOT/cmake/3.18.1" >> android/local.properties
- name: Decode and save keystore file
run: |
echo "${{ secrets.KEYSTORE_CONTENT }}" | base64 --decode > android/app/keystore.jks
- name: Create key.properties file
run: |
echo "storePassword=${{ secrets.KEYSTORE_PASSWORD }}" > android/key.properties
echo "keyPassword=${{ secrets.KEYSTORE_PASSWORD }}" >> android/key.properties
echo "keyAlias=${{ secrets.KEYSTORE_ALIAS }}" >> android/key.properties
echo "storeFile=keystore.jks" >> android/key.properties
- name: Decode google-services.json
run: echo "${{ secrets.GOOGLE_SERVICES_JSON }}" | base64 --decode > android/app/google-services.json
- name: Create .env file
run: echo -e "${{ secrets.ENV_CONTENT }}" > .env
- name: Create .env.web file
run: echo -e "${{ secrets.ENV_WEB_CONTENT }}" > .env.web
- name: Build runner
run: sh build_bunner.sh
- run: flutter build apk --release --split-per-abi
- name: Setup upterm session
uses: lhotari/action-upterm@v1
if: ${{ failure() }}
with:
wait-timeout-minutes: 5
- name: Upload APK as artifact
uses: actions/upload-artifact@v4
with:
name: apk-files
path: build/app/outputs/flutter-apk/*.apk
build_ipa:
name: Build Release IPA
runs-on: macOS-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 0
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Install rust target
run: rustup target add aarch64-apple-ios
- uses: flutter-actions/setup-flutter@v4
with:
channel: stable
version: 3.32.8
- run: flutter pub get
- run: pod repo update
working-directory: ios
- name: Decode GoogleService-Info.plist
run: echo "${{ secrets.GOOGLE_SERVICE_INFO_PLIST }}" | base64 --decode > ios/Runner/GoogleService-Info.plist
- name: Create .env file
run: echo -e "${{ secrets.ENV_CONTENT }}" > .env
- name: Create .env.web file
run: echo -e "${{ secrets.ENV_WEB_CONTENT }}" > .env.web
- name: Build runner
run: sh build_bunner.sh
- run: flutter build ios --release --no-codesign
env:
RUSTUP_NO_AUTO_UPDATE: '1'
- run: mkdir Payload
working-directory: build/ios/iphoneos
- run: mv Runner.app/ Payload
working-directory: build/ios/iphoneos
- name: Zip output
run: zip -qq -r -9 app-iphoneos-release-unsigned.ipa Payload
working-directory: build/ios/iphoneos
- name: Setup upterm session
uses: lhotari/action-upterm@v1
if: ${{ failure() }}
with:
wait-timeout-minutes: 5
- name: Upload IPA as artifact
uses: actions/upload-artifact@v4
with:
name: ipa-files
path: build/ios/iphoneos/*.ipa
build_windows:
name: Build Release Windows Installer
runs-on: windows-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Rust toolchain (stable)
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install build dependencies (CMake + LLVM)
run: choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y
shell: pwsh
- name: Add Visual Studio Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1
- name: Install NASM (required for BoringSSL)
run: choco install nasm -y
shell: pwsh
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.32.8"
channel: stable
- name: Enable Windows desktop
run: flutter config --enable-windows-desktop
- name: Install Flutter dependencies
run: flutter pub get
- name: Create .env file
run: echo "${{ secrets.ENV_CONTENT }}" > .env
- name: Create .env.web file
run: echo "${{ secrets.ENV_WEB_CONTENT }}" > .env.web
- name: Build runner
run: dart run build_runner build --delete-conflicting-outputs
- name: Build Flutter Windows app
run: flutter build windows
- name: Compile .ISS to .EXE Installer
uses: Minionguyjpro/Inno-Setup-Action@v1.2.2
with:
path: installer/app_installer.iss
options: /O+
- name: Upload Installer
uses: actions/upload-artifact@v4
with:
name: windows-files
path: installer/installer/output/app-windows-x64-release.exe
build_linux:
name: Build Release DEB
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 0
- uses: actions/setup-java@v1
with:
java-version: "20.x"
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: flutter-actions/setup-flutter@v4
with:
channel: stable
version: 3.32.8
- name: Install dependencies
run: sh linux_setup.sh
- run: flutter pub get
- name: Create .env file
run: echo -e "${{ secrets.ENV_CONTENT }}" > .env
- name: Create .env.web file
run: echo -e "${{ secrets.ENV_WEB_CONTENT }}" > .env.web
- name: Build runner
run: sh build_bunner.sh
- run: flutter build linux
- name: Pack DEB
run: sh linux_pack.sh
- name: Setup upterm session
uses: lhotari/action-upterm@v1
if: ${{ failure() }}
with:
wait-timeout-minutes: 5
- name: Upload APK as artifact
uses: actions/upload-artifact@v4
with:
name: deb-files
path: ./*.deb