Trigger pipeline #27
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Build and deploy TodoApp app" | |
on: | |
push: | |
paths: | |
- ".github/workflows/todoapp_build_and_deploy_app.yaml" | |
- "examples/todoapp/**" | |
#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: | | |
# Use a static value for testing | |
TAGNAME="todoapp-production-v1.0.0+2" | |
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 }} |