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

This commit is contained in:
2025-04-19 23:38:08 +02:00
parent 4c66f3e124
commit 4b708b74a3
7 changed files with 150 additions and 86 deletions

View File

@@ -0,0 +1,49 @@
on:
pull_request:
branches:
- main
paths:
- frontend/**
name: Build and release release apps to production track
jobs:
get-version:
name: Get version
runs-on: macos
steps:
- 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: version
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_ENV
build-android:
name: Build and upload android app
uses: ./.gitea/workflows/workflow_build-app-android.yaml
with:
type: beta
build_name: ${{ env.BUILD_NAME }}
secrets:
ANDROID_SECRET_PROPERTIES_BASE64: ${{ secrets.ANDROID_SECRET_PROPERTIES_BASE64 }}
ANDROID_GOOGLE_PLAY_JSON_BASE64: ${{ secrets.ANDROID_GOOGLE_PLAY_JSON_BASE64 }}
ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
ANDROID_GOOGLE_MAPS_API_KEY: ${{ secrets.ANDROID_GOOGLE_MAPS_API_KEY }}
build-ios:
name: Build and upload ios app
uses: ./.gitea/workflows/workflow_build-app-ios.yaml
with:
type: beta
build_name: ${{ env.BUILD_NAME }}
secrets:
MATCH_REPO_SSH_KEY: ${{ secrets.MATCH_REPO_SSH_KEY }}
GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }}
IOS_ASC_KEY_ID: ${{ secrets.IOS_ASC_KEY_ID }}
IOS_ASC_ISSUER_ID: ${{ secrets.IOS_ASC_ISSUER_ID }}
IOS_ASC_KEY: ${{ secrets.IOS_ASC_KEY }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
IOS_GOOGLE_MAPS_API_KEY: ${{ secrets.IOS_GOOGLE_MAPS_API_KEY }}

View File

@@ -0,0 +1,47 @@
on:
push:
tags:
- v*
name: Build and release release apps to production track
jobs:
get-version:
name: Get version
runs-on: macos
steps:
- name: Get version from git tag
id: version
env:
REF_NAME: ${{ gitea.ref_name }}
# remove the 'v' prefix from the tag name
run: |
echo "BUILD_NAME=${REF_NAME//v}" >> $GITHUB_ENV
build-android:
name: Build and upload android app
uses: ./.gitea/workflows/workflow_build-app-android.yaml
with:
type: release
build_name: ${{ env.BUILD_NAME }}
secrets:
ANDROID_SECRET_PROPERTIES_BASE64: ${{ secrets.ANDROID_SECRET_PROPERTIES_BASE64 }}
ANDROID_GOOGLE_PLAY_JSON_BASE64: ${{ secrets.ANDROID_GOOGLE_PLAY_JSON_BASE64 }}
ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
ANDROID_GOOGLE_MAPS_API_KEY: ${{ secrets.ANDROID_GOOGLE_MAPS_API_KEY }}
build-ios:
name: Build and upload ios app
uses: ./.gitea/workflows/workflow_build-app-ios.yaml
with:
type: release
build_name: ${{ env.BUILD_NAME }}
secrets:
MATCH_REPO_SSH_KEY: ${{ secrets.MATCH_REPO_SSH_KEY }}
GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }}
IOS_ASC_KEY_ID: ${{ secrets.IOS_ASC_KEY_ID }}
IOS_ASC_ISSUER_ID: ${{ secrets.IOS_ASC_ISSUER_ID }}
IOS_ASC_KEY: ${{ secrets.IOS_ASC_KEY }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
IOS_GOOGLE_MAPS_API_KEY: ${{ secrets.IOS_GOOGLE_MAPS_API_KEY }}

View File

@@ -1,18 +1,30 @@
on:
pull_request:
branches:
- main
paths:
- frontend/**
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 debug APK to testing track
name: Build and release android appbundle to specfied track
defaults:
run:
working-directory: frontend/android
jobs:
build:
runs-on: macos
@@ -52,15 +64,6 @@ jobs:
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
@@ -68,8 +71,8 @@ jobs:
echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 -d > release.keystore
- name: Run fastlane lane
run: bundle exec fastlane deploy_beta
run: bundle exec fastlane deploy_${{ inputs.build_type }}
env:
BUILD_NUMBER: ${{ gitea.run_number }}
BUILD_NAME: ${{ steps.build_name.outputs.BUILD_NAME }}
BUILD_NAME: ${{ inputs.build_name }}
ANDROID_GOOGLE_MAPS_API_KEY: ${{ secrets.ANDROID_GOOGLE_MAPS_API_KEY }}

View File

@@ -1,11 +1,31 @@
on:
pull_request:
branches:
- main
paths:
- frontend/**
workflow_call:
inputs:
build_type:
description: 'Release type (release, beta)'
required: true
type: string
build_name:
description: 'Build name'
required: true
type: string
secrets:
MATCH_REPO_SSH_KEY:
required: true
GOOGLE_MAPS_API_KEY:
required: true
IOS_ASC_KEY_ID:
required: true
IOS_ASC_ISSUER_ID:
required: true
IOS_ASC_KEY:
required: true
MATCH_PASSWORD:
required: true
IOS_GOOGLE_MAPS_API_KEY:
required: true
name: Build and release debugging app to ios testflight
name: Build and release ipa to specified track
defaults:
run:
@@ -42,15 +62,6 @@ jobs:
flutter clean
bundle exec pod cache clean --all
- 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: Setup SSH key for match git repo
# and mark the host as known
run: |
@@ -61,10 +72,10 @@ jobs:
MATCH_REPO_SSH_KEY: ${{ secrets.IOS_MATCH_REPO_SSH_KEY_BASE64 }}
- name: Run fastlane lane
run: bundle exec fastlane deploy_beta
run: bundle exec fastlane deploy_${{ inputs.build_type }}
env:
BUILD_NUMBER: ${{ gitea.run_number }}
BUILD_NAME: ${{ steps.build_name.outputs.BUILD_NAME }}
BUILD_NAME: ${{ inputs.build_name }}
GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }}
IOS_ASC_KEY_ID: ${{ secrets.IOS_ASC_KEY_ID }}
IOS_ASC_ISSUER_ID: ${{ secrets.IOS_ASC_ISSUER_ID }}