try more modular approach
Some checks failed
Build and release release apps to production track / Get version (pull_request) Failing after 0s
Build and release release apps to production track / Build and upload android app (pull_request) Failing after 6m15s
Build and release release apps to production track / Build and upload ios app (pull_request) Failing after 10m19s
Some checks failed
Build and release release apps to production track / Get version (pull_request) Failing after 0s
Build and release release apps to production track / Build and upload android app (pull_request) Failing after 6m15s
Build and release release apps to production track / Build and upload ios app (pull_request) Failing after 10m19s
This commit is contained in:
78
.gitea/workflows/workflow_build-app-android.yaml
Normal file
78
.gitea/workflows/workflow_build-app-android.yaml
Normal file
@@ -0,0 +1,78 @@
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
build_type:
|
||||
description: 'Release type (release, beta)'
|
||||
required: true
|
||||
type: string
|
||||
build_name:
|
||||
description: 'Build name'
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
ANDROID_SECRET_PROPERTIES_BASE64:
|
||||
required: true
|
||||
ANDROID_GOOGLE_PLAY_JSON_BASE64:
|
||||
required: true
|
||||
ANDROID_KEYSTORE_BASE64:
|
||||
required: true
|
||||
ANDROID_GOOGLE_MAPS_API_KEY:
|
||||
required: true
|
||||
|
||||
name: Build and release android appbundle to specfied track
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: frontend/android
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos
|
||||
env:
|
||||
# $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
|
||||
BUNDLE_GEMFILE: ${{ gitea.workspace }}/frontend/android/Gemfile
|
||||
|
||||
steps:
|
||||
- uses: https://gitea.com/actions/checkout@v4
|
||||
|
||||
- uses: https://github.com/actions/setup-java@v4
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'zulu'
|
||||
|
||||
- name: Setup Android SDK
|
||||
uses: https://github.com/android-actions/setup-android@v3
|
||||
|
||||
- name: Fix flutter SDK folder permission
|
||||
run: git config --global --add safe.directory "*"
|
||||
|
||||
- uses: https://github.com/subosito/flutter-action@v2
|
||||
with:
|
||||
channel: stable
|
||||
flutter-version-file: ${{ gitea.workspace }}/frontend/pubspec.yaml
|
||||
architecture: x64
|
||||
cache: true
|
||||
|
||||
- name: Install dependencies and clean up
|
||||
run: |
|
||||
flutter pub get
|
||||
flutter clean
|
||||
|
||||
- name: Set up ruby env and install fastlane
|
||||
uses: https://github.com/ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 3.3
|
||||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
||||
|
||||
- name: Add required secret files
|
||||
run: |
|
||||
echo "${{ secrets.ANDROID_SECRET_PROPERTIES_BASE64 }}" | base64 -d > secrets.properties
|
||||
echo "${{ secrets.ANDROID_GOOGLE_PLAY_JSON_BASE64 }}" | base64 -d > google-key.json
|
||||
echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 -d > release.keystore
|
||||
|
||||
- name: Run fastlane lane
|
||||
run: bundle exec fastlane deploy_${{ inputs.build_type }}
|
||||
env:
|
||||
BUILD_NUMBER: ${{ gitea.run_number }}
|
||||
BUILD_NAME: ${{ inputs.build_name }}
|
||||
ANDROID_GOOGLE_MAPS_API_KEY: ${{ secrets.ANDROID_GOOGLE_MAPS_API_KEY }}
|
Reference in New Issue
Block a user