mirror of
https://github.com/jagandeepbrar/lunasea.git
synced 2026-08-31 20:52:32 +00:00
74 lines
2.0 KiB
YAML
74 lines
2.0 KiB
YAML
name: '[Android] Build'
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
flavor:
|
|
required: true
|
|
type: string
|
|
secrets:
|
|
GOOGLE_SERVICES_JSON:
|
|
required: true
|
|
KEY_JKS:
|
|
required: true
|
|
KEY_PROPERTIES:
|
|
required: true
|
|
|
|
jobs:
|
|
build:
|
|
name: 'Build App Bundle'
|
|
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=${{ (github.event.inputs || inputs).flavor }}\nCOMMIT=${{ github.sha }}' > .flavor
|
|
|
|
- name: Install Secret Keys
|
|
working-directory: ${{ github.workspace }}
|
|
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
|
|
|
|
- name: Install Ruby
|
|
uses: ruby/setup-ruby@v1
|
|
|
|
- name: Install Java
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
distribution: 'zulu'
|
|
java-version: '11'
|
|
|
|
- name: Install Flutter
|
|
uses: subosito/flutter-action@v2
|
|
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 build
|
|
|
|
- name: Upload App Bundle Artifact
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: android-${{ (github.event.inputs || inputs).flavor }}-${{ github.sha }}
|
|
path: ${{ github.workspace }}/build/app/outputs/bundle/release/app-release.aab
|