mirror of
https://github.com/jagandeepbrar/lunasea.git
synced 2026-08-31 12:42:34 +00:00
70 lines
1.8 KiB
YAML
70 lines
1.8 KiB
YAML
name: '[Build] Android'
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
flavor:
|
|
required: true
|
|
type: string
|
|
secrets:
|
|
GOOGLE_SERVICES_JSON:
|
|
required: true
|
|
KEY_JKS:
|
|
required: true
|
|
KEY_PROPERTIES:
|
|
required: true
|
|
GOOGLE_PLAY_API:
|
|
required: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v2
|
|
with:
|
|
ref: 'master'
|
|
fetch-depth: 0
|
|
|
|
- name: Set Flavor
|
|
working-directory: ${{ github.workspace }}
|
|
run: |
|
|
echo $'FLAVOR=${{ inputs.flavor }}\nCOMMIT=${{ github.sha }}' > .flavor
|
|
|
|
- name: Install Secret Keys
|
|
run: |
|
|
echo ${{ secrets.GOOGLE_SERVICES_JSON }} | base64 --decode > android/app/google-services.json
|
|
echo ${{ secrets.KEY_JKS }} | base64 --decode > android/key.jks
|
|
echo ${{ secrets.KEY_PROPERTIES }} | base64 --decode > android/key.properties
|
|
echo ${{ secrets.GOOGLE_PLAY_API }} | base64 --decode > .fastlane-android-auth.json
|
|
|
|
- name: Install Ruby
|
|
uses: ruby/setup-ruby@v1
|
|
with:
|
|
ruby-version: '2.7.5'
|
|
|
|
- name: Install Java
|
|
uses: actions/setup-java@v1
|
|
with:
|
|
java-version: '12.x'
|
|
|
|
- name: Install Flutter
|
|
uses: subosito/flutter-action@v2.0.3
|
|
with:
|
|
channel: 'beta'
|
|
|
|
- name: Setup Flutter
|
|
working-directory: ${{ github.workspace }}
|
|
run: |
|
|
flutter pub get
|
|
flutter packages pub run build_runner build
|
|
|
|
- name: Run Fastlane
|
|
working-directory: ${{ github.workspace }}/android
|
|
env:
|
|
SUPPLY_JSON_KEY: ${{ github.workspace }}/.fastlane-android-auth.json
|
|
run: |
|
|
bundle install
|
|
bundle exec fastlane alpha
|