CI: Try to get it to build Android

Avoid running this is my own special container with all the
dependencies. That was a pain to maintain, and lets try to use the
GitHub's recommended way of doing it.
This commit is contained in:
Vishesh Handa
2023-10-10 01:55:28 +02:00
parent e206c64d2f
commit 42b2e6ba90
3 changed files with 23 additions and 13 deletions

View File

@ -12,7 +12,6 @@ on:
jobs: jobs:
Build: Build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: ghcr.io/gitjournal/flutter-android-sdk:latest
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -21,17 +20,28 @@ jobs:
- run: git config --global --add safe.directory '*' - run: git config --global --add safe.directory '*'
- name: Test - name: Test
run: ./scripts/test.sh run: ./scripts/test.sh
# - name: Test Report
# uses: dorny/test-reporter@v1 - name: Unlock secrets
# if: success() || failure() uses: sliteteam/github-action-git-crypt-unlock@1.2.0
# with:
# name: Unit Tests ${{ matrix.os }} ${{ matrix.sdk }}
# path: test-results.xml
# reporter: jest-junit
- name: Unlock Secrets
env: env:
GITCRYPT_KEY: ${{ secrets.GITCRYPT_KEY }} GIT_CRYPT_KEY: ${{ secrets.GITCRYPT_KEY }}
run: ./scripts/decrypt_secrets.sh - uses: actions/setup-java@v2
with:
distribution: "zulu"
java-version: "11"
- uses: nttld/setup-ndk@v1
with:
ndk-version: r19
- name: Get Flutter version from pubspec
run: |
set -e
FLUTTER_VERSION=$(cat pubspec.yaml | grep 'flutter:' | head -n 1 | awk '{ print $2 }' | tr -d '"' | cut -d "=" -f 2)
echo "FLUTTER_VERSION=${FLUTTER_VERSION}" >> $GITHUB_ENV
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- name: Setup Env - name: Setup Env
run: dart ./scripts/setup_env.dart run: dart ./scripts/setup_env.dart
- name: Build - name: Build

View File

@ -2116,4 +2116,4 @@ packages:
version: "0.0.12" version: "0.0.12"
sdks: sdks:
dart: ">=3.1.0-185.0.dev <4.0.0" dart: ">=3.1.0-185.0.dev <4.0.0"
flutter: ">=3.10.0" flutter: ">=3.13.6"

View File

@ -4,7 +4,7 @@ version: 1.86.2+10
environment: environment:
sdk: ">=2.19.2 <3.0.0" sdk: ">=2.19.2 <3.0.0"
flutter: ">=3.7.2" flutter: ">=3.13.6"
publish_to: none publish_to: none