-
Notifications
You must be signed in to change notification settings - Fork 21
59 lines (52 loc) · 2.5 KB
/
build_and_deploy_booking_app.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: "Build and deploy Booking app"
on:
push:
tags:
- 'booking_app-*-v[0-9]+.[0-9]+.[0-9]+\+[0-9]+' # Example: booking_app-development-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_android_app:
needs: app_version_extraction
uses: ./.github/workflows/fastlane_build_and_deploy_android_app.yaml
with:
flutter_version: "3.13.9"
project_path: "examples/booking_app"
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: false
secrets:
mobile_distribution_encryption_password: ${{ secrets.BOOKING_MOBILE_DISTRIBUTION_ENCRYPTION_PASSWORD }}
mobile_distribution_repository_access_secret: ${{ secrets.BOOKING_MOBILE_DISTRIBUTION_REPOSITORY_ACCESS_SECRET }}
build_ios_app:
needs: app_version_extraction
uses: ./.github/workflows/fastlane_build_and_deploy_ios_app.yaml
with:
flutter_version: "3.13.9"
project_path: "examples/booking_app"
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: false
secrets:
mobile_distribution_encryption_password: ${{ secrets.BOOKING_MOBILE_DISTRIBUTION_ENCRYPTION_PASSWORD }}
mobile_distribution_repository_access_secret: ${{ secrets.BOOKING_MOBILE_DISTRIBUTION_REPOSITORY_ACCESS_SECRET }}