mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-08-06 15:21:21 +08:00
82 lines
2.5 KiB
YAML
82 lines
2.5 KiB
YAML
version: 2.1
|
|
jobs:
|
|
build_android:
|
|
docker:
|
|
- image: vhanda/flutter-android:latest
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
name: Setup GitJournal Build Env
|
|
command: /opt/flutter/bin/cache/dart-sdk/bin/dart ./scripts/setup_env.dart
|
|
- run:
|
|
name: SSH Problem
|
|
command: echo 'Host *\n StrictHostKeyChecking no' > ~/.ssh/config
|
|
- run:
|
|
name: Test
|
|
command: flutter test -j 1 --coverage --machine | tojunit --output junit.xml
|
|
- store_test_results:
|
|
path: ./
|
|
- run:
|
|
name: Analyze
|
|
command: flutter analyze
|
|
- run:
|
|
name: Decode Android key store
|
|
command: echo "$KEYSTORE" | base64 -di > android/app/keystore.jks
|
|
- run:
|
|
name: Create Google Play key
|
|
command: echo "$GOOGLE_PLAY_KEY" | base64 -di > android/google-play-api-key.json
|
|
- run:
|
|
name: Create Android Key file
|
|
command: echo "$ANDROID_KEY_FILE" | base64 -di > android/key.properties
|
|
- run:
|
|
name: Build
|
|
command: ./scripts/build.sh
|
|
- store_artifacts:
|
|
path: build/app/outputs/bundle/prodRelease/app.aab
|
|
destination: gitjournal.aab
|
|
- run:
|
|
name: Generate Test Coverage
|
|
command: ./scripts/test_coverage.sh
|
|
- store_artifacts:
|
|
path: coverage
|
|
# - run:
|
|
# name: Upload Crashlytics Symbols
|
|
# command: ./scripts/android_crashlytics.sh
|
|
- run:
|
|
name: Publish Alpha
|
|
command: cd android && fastlane alphaBuild
|
|
# build_ios:
|
|
# macos:
|
|
# xcode: 11.3.1
|
|
# steps:
|
|
# - checkout
|
|
# - run:
|
|
# name: Install gpg
|
|
# command: brew install gnupg git-crypt md5sha1sum wget gnu-sed
|
|
# - run:
|
|
# name: Install Flutter
|
|
# command: ./scripts/ios_install_flutter.sh
|
|
# - run:
|
|
# name: Setup Environment Variables
|
|
# command: |
|
|
# echo "export PATH=flutter/bin:$PATH" >> $BASH_ENV
|
|
# - run:
|
|
# name: Unlock Secrets
|
|
# command: ./scripts/decrypt_secrets.sh
|
|
# - run:
|
|
# name: Setup GitJournal Build Env
|
|
# command: ./flutter/bin/cache/dart-sdk/bin/dart ./scripts/setup_env.dart
|
|
# - run:
|
|
# name: Setup provisioning profile
|
|
# command: ./scripts/add_ios_keys.sh
|
|
# - run:
|
|
# name: Build App
|
|
# command: ./scripts/build_ios.sh
|
|
|
|
workflows:
|
|
version: 2
|
|
build_all:
|
|
jobs:
|
|
- build_android
|
|
# - build_ios
|