Merge pull request #70 from KlubJagiellonski/release/v2.0.6 #127
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Android | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: # Allows to trigger the workflow from GitHub | |
jobs: | |
build_android: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: "3.16.7" | |
channel: 'stable' | |
cache: true # Speed up the process | |
- name: Get dependencies | |
run: flutter pub get | |
- 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 |