Skip to content

Moved main.dart to lib/main.dart from lib/app/main.dart #2

Moved main.dart to lib/main.dart from lib/app/main.dart

Moved main.dart to lib/main.dart from lib/app/main.dart #2

Workflow file for this run

name: 🛠 Android CI / Build & Release APK
on:
push:
branches:
- '**'
tags:
- 'v*.*.*'
pull_request:
branches:
- '**'
permissions:
contents: write
actions: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_and_release:
runs-on: ubuntu-24.04
steps:
# Checkout
- name: 📂 Checkout code
uses: actions/checkout@v4
# Cache pub deps
- name: 🚀 Cache pub deps
uses: actions/cache@v4
with:
path: ~/.pub-cache
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.yaml') }}
restore-keys: ${{ runner.os }}-pub-
# Java 21
- name: ☕ Setup Java (Temurin 21)
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
# Flutter
- name: 🦋 Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
# Flutter pub get
- name: 📥 Get dependencies
run: flutter pub get
# Setup sherpa models + keyword assets
- name: 🔧 Setup speech model assets
run: bash scripts/setup_assets.sh
# Build APKs
- name: 🏗 Build APKs
run: flutter build apk --release --split-per-abi
# Prepare artifacts for upload/release
- name: 📦 Prepare artifacts
run: |
mkdir -p artifacts
cp build/app/outputs/flutter-apk/*.apk artifacts/
# ─────────────── ONLY ON TAGS ───────────────
- name: 🏷️ Create or update Release
if: startsWith(github.ref, 'refs/tags/v')
uses: ncipollo/release-action@v1
with:
tag: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
artifacts: artifacts/*.apk
token: ${{ secrets.GITHUB_TOKEN }}