-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (35 loc) · 1.33 KB
/
build_android.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
name: Build Android
on:
push:
pull_request:
jobs:
build_android:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '18'
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true # Speed up the process
- name: Get dependencies
run: flutter pub get
- run: dart run build_runner build
- name: Create googleservices file
run: cat /home/runner/work/pola-flutter/pola-flutter/android/app/google-services.json | base64
- name: Putting secret data
env:
DATA: ${{ secrets.GOOGLESERVICES }}
run: echo $DATA > /home/runner/work/pola-flutter/pola-flutter/android/app/google-services.json
- name: Build apk
run: flutter build apk --debug
# - uses: "finnp/create-file-action@master" this step doesn't work
# env:
# FILE_NAME: "/home/runner/work/pola-flutter/pola-flutter/android/app/google-services.json"
# FILE_BASE64: ${{ secrets.GOOGLESERVICES }}
# - run: flutter build apk --debug