mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2025-12-26 12:59:30 +00:00
Replace setup-env action with reusable flutter-setup workflow; streamline CI configuration and enhance dependency management
This commit is contained in:
parent
0d2db7778a
commit
d55ddc5b78
3 changed files with 74 additions and 44 deletions
44
.github/workflows/flutter_test.yaml
vendored
44
.github/workflows/flutter_test.yaml
vendored
|
|
@ -5,17 +5,23 @@ on:
|
|||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: setup env
|
||||
uses: ./.github/actions/setup-env.yaml
|
||||
name: Test
|
||||
|
||||
uses: ./.github/workflows/flutter-setup.yaml
|
||||
secrets: inherit
|
||||
with:
|
||||
flutter-channel: stable
|
||||
java-version: 17
|
||||
|
||||
steps:
|
||||
# Debug: Echo current directory contents
|
||||
- name: List root directory contents
|
||||
run: |
|
||||
|
|
@ -37,14 +43,21 @@ jobs:
|
|||
echo "\nSubmodule details:"
|
||||
git submodule foreach 'echo $path: && pwd && ls -la'
|
||||
|
||||
- name: Run flutter tests
|
||||
- name: Run static analysis
|
||||
run: flutter analyze
|
||||
|
||||
- name: Run tests
|
||||
run: flutter test
|
||||
|
||||
build_android:
|
||||
name: Build Android APKs
|
||||
needs: test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: ./.github/actions/setup-env.yaml
|
||||
- uses: ./.github/workflows/flutter-setup.yaml
|
||||
with:
|
||||
flutter-channel: stable
|
||||
java-version: 17
|
||||
|
||||
- name: Decode android/upload.jks
|
||||
run: echo "${{ secrets.UPLOAD_KEYSTORE_JKS }}" | base64 --decode > android/upload.jks
|
||||
|
|
@ -52,18 +65,16 @@ jobs:
|
|||
- 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
|
||||
|
||||
- name: Upload Android APK Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release-apk
|
||||
path: build/app/outputs/flutter-apk/*.apk
|
||||
build_linux:
|
||||
needs: test
|
||||
runs-on: ubuntu-latest
|
||||
|
|
@ -75,14 +86,9 @@ jobs:
|
|||
- 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
|
||||
- name: Upload deb Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: build-artifacts
|
||||
path: |
|
||||
build/app/outputs/flutter-apk/*.apk
|
||||
dist/*/*.deb
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue