correctly infer version from tags
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

This commit is contained in:
Remy Moll 2025-04-19 17:43:59 +02:00
parent 1e2690f8ce
commit 1f1efec804
2 changed files with 17 additions and 15 deletions

View File

@ -6,7 +6,7 @@ on:
- frontend/**
name: Build and release debug APK
name: Build and release debug APK to testing track
defaults:
run:
@ -52,13 +52,14 @@ jobs:
ruby-version: 3.3
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Infer version number from git tag
id: version
env:
REF_NAME: ${{ gitea.ref_name }}
run:
- 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=${REF_NAME//v}" >> $GITHUB_ENV
echo "BUILD_NAME=${LATEST_TAG//v}" >> $GITHUB_OUTPUT
- name: Add required secret files
run: |
@ -70,5 +71,5 @@ jobs:
run: bundle exec fastlane deploy_beta
env:
BUILD_NUMBER: ${{ gitea.run_number }}
# BUILD_NAME is implicitly available
BUILD_NAME: ${{ steps.build_name.outputs.BUILD_NAME }}
ANDROID_GOOGLE_MAPS_API_KEY: ${{ secrets.ANDROID_GOOGLE_MAPS_API_KEY }}

View File

@ -42,13 +42,14 @@ jobs:
ruby-version: 3.3
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Infer version number from git tag
id: version
env:
REF_NAME: ${{ gitea.ref_name }}
run:
- 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=${REF_NAME//v}" >> $GITHUB_ENV
echo "BUILD_NAME=${LATEST_TAG//v}" >> $GITHUB_OUTPUT
- name: Setup SSH key for match git repo
# and mark the host as known
@ -63,7 +64,7 @@ jobs:
run: bundle exec fastlane deploy_beta
env:
BUILD_NUMBER: ${{ gitea.run_number }}
# BUILD_NAME is implicitly available
BUILD_NAME: ${{ steps.build_name.outputs.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 }}