Skip to content

Commit eba498c

Browse files
author
Jonas Greifenhain
committed
workflows: Add switch for internal and production Android releases
1 parent 80dd3d8 commit eba498c

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

.github/workflows/android_build_and_deploy.yaml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,20 @@ on:
77
description: "Branch to deploy"
88
required: true
99
default: "main"
10+
release_type:
11+
description: "Release type"
12+
required: true
13+
default: "internal"
14+
type: choice
15+
options:
16+
- internal
17+
- production
1018

1119
jobs:
1220
deploy_for_android:
1321
runs-on: ubuntu-latest
22+
env:
23+
RELEASE_TYPE: ${{ github.event.inputs.release_type }}
1424
steps:
1525
- name: Checkout repository
1626
uses: actions/checkout@v2
@@ -58,7 +68,18 @@ jobs:
5868
- name: Set up fastlane
5969
run: (cd open_wearable/android && bundle install)
6070

61-
- name: Build & deploy Android release
62-
run: (cd open_wearable/android && bundle exec fastlane internal_deploy)
71+
- name: Build & deploy Android (Internal)
72+
if: ${{ github.event.inputs.release_type == 'internal' }}
73+
run: |
74+
cd open_wearable/android
75+
bundle exec fastlane internal_deploy
76+
env:
77+
OPEN_WEARABLE_APP_ANDROID_KEYSTORE_PASSWORD: ${{ secrets.OPEN_WEARABLE_APP_ANDROID_KEYSTORE_PASSWORD }}
78+
79+
- name: Build & deploy Android (Production)
80+
if: ${{ github.event.inputs.release_type == 'production' }}
81+
run: |
82+
cd open_wearable/android
83+
bundle exec fastlane production_deploy
6384
env:
6485
OPEN_WEARABLE_APP_ANDROID_KEYSTORE_PASSWORD: ${{ secrets.OPEN_WEARABLE_APP_ANDROID_KEYSTORE_PASSWORD }}

0 commit comments

Comments
 (0)