Skip to content

Commit

Permalink
chore: build primary sample app
Browse files Browse the repository at this point in the history
  • Loading branch information
mrehan27 committed Jan 9, 2025
1 parent 68f478b commit 9862a7c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/reusable_build_sample_apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,29 @@ jobs:
with:
fetch-depth: 0 # Workaround for bug https://github.com/actions/checkout/issues/1471

- name: Set Default Firebase Distribution Groups
run: |
# Define all the possible distribution groups
ALL_BUILDS_GROUP="all-builds"
FEATURE_BUILDS_GROUP="feature-branch"
STABLE_BUILDS_GROUP="next"
# Initialize with the default distribution group
distribution_groups=("$ALL_BUILDS_GROUP")
# Determine current app type and Git context
is_primary_app=$([[ "${{ matrix.sample-app }}" == "java_layout" ]] && echo "true" || echo "false")
current_branch="${GITHUB_REF}"
# Append distribution groups based on branch and context if the app is primary
if [[ "$is_primary_app" == "true" ]]; then
[[ "$current_branch" == "refs/heads/feature/"* ]] && distribution_groups+=("$FEATURE_BUILDS_GROUP")
[[ "$current_branch" == "refs/heads/main" ]] && distribution_groups+=("$STABLE_BUILDS_GROUP")
fi
# Export the groups as an environment variable
echo "firebase_distribution_groups=$(IFS=','; echo "${distribution_groups[*]}")" >> $GITHUB_ENV
- name: Get latest SDK version
if: ${{ inputs.use_latest_sdk_version == true }}
id: latest-sdk-version-step
Expand Down
2 changes: 1 addition & 1 deletion samples/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ platform :android do
name_of_sample_app_module = File.basename(path_to_root_directory_sample_app) # just get the name of the directory I am in now. `samples/N`

new_app_version = get_new_app_version().gsub("/", ".")
test_groups = get_build_test_groups()
test_groups = get_build_test_groups(distribution_groups: arguments[:distribution_groups])
app_package_name = CredentialsManager::AppfileConfig.try_fetch_value(:package_name) # get package_name from Appfile

build_sample_app(
Expand Down

0 comments on commit 9862a7c

Please sign in to comment.