Skip to content

Update signing identity #44

Update signing identity

Update signing identity #44

name: "Build and deploy TodoApp app"
on:
push:
tags:
- 'todoapp-*-v[0-9]+.[0-9]+.[0-9]+\+[0-9]+' # Example: todoapp-production-v1.2.3+45
jobs:
app_version_extraction:
runs-on: ubuntu-latest
steps:
- name: Extract build name and number from tag
id: extraction
run: |
TAGNAME=$(echo "${GITHUB_REF#refs/tags/*}")
VERSION=$(echo $TAGNAME | rev | cut -d "v" -f 1 | rev)
BUILD_NAME=$(echo $VERSION | cut -d "+" -f 1)
BUILD_NUMBER=$(echo $VERSION | cut -d "+" -f 2-)
NAMEWITHENV=$(echo $TAGNAME | rev | cut -d "-" -f 2- | rev)
FLAVOR=$(echo $NAMEWITHENV | rev | cut -d "-" -f 1 | rev)
# Export the variables, so they are visible in other jobs
echo "build_name=${BUILD_NAME}" >> $GITHUB_OUTPUT
echo "build_number=${BUILD_NUMBER}" >> $GITHUB_OUTPUT
echo "flavor=${FLAVOR}" >> $GITHUB_OUTPUT
outputs:
build_name: ${{ steps.extraction.outputs.build_name }}
build_number: ${{ steps.extraction.outputs.build_number }}
flavor: ${{ steps.extraction.outputs.flavor }}
build_and_deploy_android:
needs: app_version_extraction
uses: ./.github/workflows/fastlane_build_and_deploy_android_app.yaml
with:
project_path: "examples/todoapp"
build_name: ${{ needs.app_version_extraction.outputs.build_name }}
build_number: ${{ needs.app_version_extraction.outputs.build_number }}
flavor: ${{ needs.app_version_extraction.outputs.flavor }}
publish_to_store: true
secrets:
credential_encryption_password: ${{ secrets.TODOAPP_MOBILE_DISTRIBUTION_ENCRYPTION_PASSWORD }}
credential_repository_access_secret: ${{ secrets.TODOAPP_MOBILE_DISTRIBUTION_REPOSITORY_ACCESS_SECRET }}
build_and_deploy_ios:
needs: app_version_extraction
uses: ./.github/workflows/fastlane_build_and_deploy_ios_app.yaml
with:
project_path: "examples/todoapp"
build_name: ${{ needs.app_version_extraction.outputs.build_name }}
build_number: ${{ needs.app_version_extraction.outputs.build_number }}
flavor: ${{ needs.app_version_extraction.outputs.flavor }}
publish_to_store: true
secrets:
credential_encryption_password: ${{ secrets.TODOAPP_MOBILE_DISTRIBUTION_ENCRYPTION_PASSWORD }}
credential_repository_access_secret: ${{ secrets.TODOAPP_MOBILE_DISTRIBUTION_REPOSITORY_ACCESS_SECRET }}