This repository has been archived by the owner on Apr 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
53 lines (50 loc) · 1.69 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Build
'on':
push:
branches:
- master
env:
flutter_version: 3.7.0
jobs:
build:
name: Build
runs-on: macos-latest
steps:
- name: Check out
uses: actions/checkout@v2
- name: Cache Flutter dependencies
uses: actions/cache@v2
with:
path: /Users/runner/hostedtoolcache/flutter
key: '${{ runner.OS }}-flutter-install-cache-${{ env.flutter_version }}'
- name: Set up flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '${{ env.flutter_version }}'
- uses: actions/setup-java@v1
with:
java-version: 12.x
- name: Get dependencies
run: flutter pub get
- name: Format source code
run: flutter format --set-exit-if-changed .
- name: Analyze source code
run: flutter analyze .
- name: Add config files
env:
KEYSTORE_PROPERTIES: '${{ secrets.KEYSTORE_PROPERTIES }}'
GOOGLE_SERVICES_STAGE_JSON: '${{ secrets.GOOGLE_SERVICES_STAGE_JSON }}'
RELEASE_JKS: '${{ secrets.RELEASE_JKS }}'
run: >
sudo echo "$KEYSTORE_PROPERTIES" > android/key.properties
mkdir -p android/app/src/stage
sudo echo $GOOGLE_SERVICES_STAGE_JSON >
android/app/src/stage/google-services.json
sudo echo "$RELEASE_JKS" | base64 -d > android/release.jks
- name: Build stage application
run: >-
flutter build apk --obfuscate
--split-debug-info=build/app/outputs/symbols --split-per-abi
--dart-define=ENV_APP_NAME="Hit Notes Stage"
--dart-define=ENV_FLAVOR=stage
--dart-define=ENV_FACEBOOK_APP_ID=134284937214878