mirror of
https://github.com/jagandeepbrar/lunasea.git
synced 2026-08-31 20:52:32 +00:00
152 lines
4.1 KiB
YAML
152 lines
4.1 KiB
YAML
name: '[Release] Android'
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
build_number:
|
|
required: true
|
|
type: string
|
|
|
|
secrets:
|
|
FIREBASE_OPTIONS:
|
|
required: true
|
|
KEY_JKS:
|
|
required: true
|
|
KEY_PROPERTIES:
|
|
required: true
|
|
|
|
jobs:
|
|
build_app_bundle:
|
|
name: App Bundle
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Download Source Files
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: lib
|
|
path: ${{ github.workspace }}/lib
|
|
|
|
- name: Download Localization Files
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: localization
|
|
path: ${{ github.workspace }}/assets/localization
|
|
|
|
- name: Install Secrets
|
|
working-directory: ${{ github.workspace }}
|
|
run: |
|
|
echo ${{ secrets.FIREBASE_OPTIONS }} | base64 --decode > lib/firebase_options.dart
|
|
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
|
|
with:
|
|
bundler-cache: true
|
|
|
|
- name: Install Java
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
distribution: zulu
|
|
java-version: 11
|
|
|
|
- name: Install Flutter
|
|
uses: subosito/flutter-action@v2
|
|
with:
|
|
channel: stable
|
|
cache: true
|
|
cache-key: ${{ github.sha }}
|
|
|
|
- name: Setup Flutter
|
|
working-directory: ${{ github.workspace }}
|
|
run: |
|
|
flutter pub get
|
|
|
|
- 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_aab build_number:${{ inputs.build_number }}
|
|
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: android-app-bundle
|
|
path: ${{ github.workspace }}/output
|
|
|
|
build_app_package:
|
|
name: App Package
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Download Source Files
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: lib
|
|
path: ${{ github.workspace }}/lib
|
|
|
|
- name: Download Localization Files
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: localization
|
|
path: ${{ github.workspace }}/assets/localization
|
|
|
|
- name: Install Secrets
|
|
working-directory: ${{ github.workspace }}
|
|
run: |
|
|
echo ${{ secrets.FIREBASE_OPTIONS }} | base64 --decode > lib/firebase_options.dart
|
|
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
|
|
with:
|
|
bundler-cache: true
|
|
|
|
- name: Install Java
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
distribution: zulu
|
|
java-version: 11
|
|
|
|
- name: Install Flutter
|
|
uses: subosito/flutter-action@v2
|
|
with:
|
|
channel: stable
|
|
cache: true
|
|
cache-key: ${{ github.sha }}
|
|
|
|
- name: Setup Flutter
|
|
working-directory: ${{ github.workspace }}
|
|
run: |
|
|
flutter pub get
|
|
|
|
- name: Setup Fastlane
|
|
working-directory: ${{ github.workspace }}/android
|
|
run: |
|
|
bundle install
|
|
|
|
- name: Run Fastlane
|
|
working-directory: ${{ github.workspace }}/android
|
|
env:
|
|
SUPPLY_JSON_KEY: ${{ github.workspace }}/.fastlane-android-auth.json
|
|
run: |
|
|
bundle exec fastlane build_apk build_number:${{ inputs.build_number }}
|
|
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: android-app-package
|
|
path: ${{ github.workspace }}/output
|