Skip to content

Commit 2dbc04e

Browse files
authored
Ensure daily builds are uploaded to Testflight and Google Play (#536)
1 parent 722d964 commit 2dbc04e

File tree

2 files changed

+27
-13
lines changed

2 files changed

+27
-13
lines changed

.github/workflows/android.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ on:
2424
- "yes"
2525
- "no"
2626
schedule:
27-
# Temporary test: trigger once at 21:15 UTC (≈10 minutes from now).
28-
- cron: "15 21 * * *"
27+
# Temporary test: trigger once at 21:40 UTC
28+
- cron: "40 21 * * *"
2929

3030
concurrency:
3131
group:
@@ -137,9 +137,16 @@ jobs:
137137

138138
- name: Set env
139139
run: |
140-
echo "UPLOAD_TO_GOOGLE_PLAY=${{ github.event.inputs.upload_to_google_play }}" >> $GITHUB_ENV
141-
# Translate env input to Android flavor (dev/prod map directly to flavor dimension)
142-
export ANDROID_FLAVOR="${{ github.event.inputs.env }}"
140+
# If the workflow is triggered by a scheduled event, always upload to Google Play
141+
# and use the 'dev' Android flavor
142+
if [[ "${{ github.event_name }}" == "schedule" ]]; then
143+
echo "UPLOAD_TO_GOOGLE_PLAY=yes" >> $GITHUB_ENV
144+
export ANDROID_FLAVOR="dev"
145+
else
146+
echo "UPLOAD_TO_GOOGLE_PLAY=${{ github.event.inputs.upload_to_google_play }}" >> $GITHUB_ENV
147+
# Translate env input to Android flavor (dev/prod map directly to flavor dimension)
148+
export ANDROID_FLAVOR="${{ github.event.inputs.env }}"
149+
fi
143150
./scripts/gh-android-env >> $GITHUB_ENV
144151
145152
- name: Decode and save sentry.properties

.github/workflows/ios.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ on:
2424
- "yes"
2525
- "no"
2626
schedule:
27-
# Temporary test: trigger once at 21:15 UTC (≈10 minutes from now).
28-
- cron: "15 21 * * *"
27+
# Temporary test: trigger once at 21:40 UTC
28+
- cron: "40 21 * * *"
2929

3030
concurrency:
3131
group:
@@ -138,14 +138,21 @@ jobs:
138138

139139
- name: Set env
140140
run: |
141-
echo "UPLOAD_TO_TESTFLIGHT=${{ github.event.inputs.upload_to_testflight }}" >> $GITHUB_ENV
142-
# Translate env input to iOS scheme
143-
if [[ "${{ github.event.inputs.env }}" == "dev" ]]; then
141+
# If the workflow is triggered by a scheduled event, always upload to TestFlight
142+
# and use the 'freighter-mobile-dev' iOS scheme
143+
if [[ "${{ github.event_name }}" == "schedule" ]]; then
144+
echo "UPLOAD_TO_TESTFLIGHT=yes" >> $GITHUB_ENV
144145
export IOS_SCHEME="freighter-mobile-dev"
145-
elif [[ "${{ github.event.inputs.env }}" == "prod" ]]; then
146-
export IOS_SCHEME="freighter-mobile"
147146
else
148-
export IOS_SCHEME=""
147+
echo "UPLOAD_TO_TESTFLIGHT=${{ github.event.inputs.upload_to_testflight }}" >> $GITHUB_ENV
148+
# Translate env input to iOS scheme
149+
if [[ "${{ github.event.inputs.env }}" == "dev" ]]; then
150+
export IOS_SCHEME="freighter-mobile-dev"
151+
elif [[ "${{ github.event.inputs.env }}" == "prod" ]]; then
152+
export IOS_SCHEME="freighter-mobile"
153+
else
154+
export IOS_SCHEME=""
155+
fi
149156
fi
150157
./scripts/gh-ios-env >> $GITHUB_ENV
151158

0 commit comments

Comments
 (0)