anyway/.gitea/workflows/frontend_build-app-android.yaml
Remy Moll 1f1efec804
Some checks failed
Build and release debug APK to testing track / build (pull_request) Successful in 26m7s
Build and release debugging app to ios testflight / build (pull_request) Failing after 3m17s
correctly infer version from tags
2025-04-19 17:43:59 +02:00

76 lines
2.3 KiB
YAML

on:
pull_request:
branches:
- main
paths:
- frontend/**
name: Build and release debug APK to testing 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: Fetch tags from main branch
# since this workflow is triggered by a pull request, we want to match the latest tag of the main branch
id: build_name
run: |
git fetch origin main --tags
LATEST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
# remove the 'v' prefix from the tag name
echo "BUILD_NAME=${LATEST_TAG//v}" >> $GITHUB_OUTPUT
- 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_beta
env:
BUILD_NUMBER: ${{ gitea.run_number }}
BUILD_NAME: ${{ steps.build_name.outputs.BUILD_NAME }}
ANDROID_GOOGLE_MAPS_API_KEY: ${{ secrets.ANDROID_GOOGLE_MAPS_API_KEY }}