mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2025-12-24 03:49:30 +00:00
87 lines
2.1 KiB
YAML
87 lines
2.1 KiB
YAML
name: Flutter Test
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: ./.github/actions/setup-env.yaml
|
|
|
|
# Debug: Echo current directory contents
|
|
- name: List root directory contents
|
|
run: |
|
|
pwd
|
|
ls -la
|
|
|
|
# Debug: Recursive directory structure
|
|
- name: Show full directory structure
|
|
run: |
|
|
echo "Full directory structure:"
|
|
tree -L 3
|
|
|
|
# Debug: Submodule status and details
|
|
- name: Check submodule status
|
|
run: |
|
|
echo "Submodule status:"
|
|
git submodule status
|
|
|
|
echo "\nSubmodule details:"
|
|
git submodule foreach 'echo $path: && pwd && ls -la'
|
|
|
|
- name: Run flutter tests
|
|
run: flutter test
|
|
|
|
build_android:
|
|
needs: test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: ./.github/actions/setup-env.yaml
|
|
|
|
- name: Decode android/upload.jks
|
|
run: echo "${{ secrets.UPLOAD_KEYSTORE_JKS }}" | base64 --decode > android/upload.jks
|
|
|
|
- name: Decode android/key.properties
|
|
run: echo "${{ secrets.KEY_PROPERTIES }}" | base64 --decode > android/key.properties
|
|
|
|
- name: Set Up Java
|
|
uses: actions/setup-java@v3.12.0
|
|
with:
|
|
distribution: "oracle"
|
|
java-version: "17"
|
|
|
|
- name: Build Universal APK
|
|
run: flutter build apk --release
|
|
|
|
- name: Rename Universal APK
|
|
run: mv build/app/outputs/flutter-apk/{app-release,app-universal-release}.apk
|
|
|
|
build_linux:
|
|
needs: test
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: setup fastforge
|
|
run: |
|
|
dart pub global activate fastforge
|
|
- name: Build Linux AppImage
|
|
run: fastforge package --platform linux --targets deb
|
|
|
|
upload_artifacts:
|
|
needs: [build_android, build_linux]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Upload Artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: build-artifacts
|
|
path: |
|
|
build/app/outputs/flutter-apk/*.apk
|
|
dist/*/*.deb
|