Skip to content

Test commit 11

Test commit 11 #10

name: Build sample app for SDK release
on:
push:
branches: [MBL-553-build-sample-app-for-sdk-release]
workflow_dispatch:
jobs:
build-sample-app:
runs-on: ubuntu-latest
name: Build sample app
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get latest SDK version
id: latest-sdk-version-step
run: |
latest_tag=$(git describe --tags --abbrev=0)
echo "LATEST_TAG=$latest_tag" >> "$GITHUB_OUTPUT"
- uses: ./.github/actions/setup-android
# CLI to replace strings in files. The CLI recommends using `cargo install` which is slow. This Action is fast because it downloads pre-built binaries.
# If using sd on macos, "brew install" works great. for Linux, this is the recommended way.
- name: Install sd CLI to use later in the workflow
# uses: kenji-miyake/setup-sd@v1
uses: levibostian/setup-sd@add-file-extension # Using fork until upstream Action has bug fixed in it.
- name: Install tools from Gemfile (ruby language) used for building our apps with
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true # cache tools to make builds faster in future
- name: Setup local.properties file for sample app
env:
SDK_VERSION: ${{ steps.latest-sdk-version-step.outputs.LATEST_TAG }}
run: |
touch "samples/local.properties"
echo "cdpApiKey=${{ secrets.CUSTOMERIO_JAVA_WORKSPACE_CDP_API_KEY }}" >> "samples/local.properties"
echo "siteId=${{ secrets.CUSTOMERIO_JAVA_WORKSPACE_SITE_ID }}" >> "samples/local.properties"
echo "sdkVersion=${{ env.SDK_VERSION }}" >> "samples/local.properties"
- name: Dump GitHub Action metadata because Fastlane uses it. Viewing it here helps debug JSON parsing code in Firebase.
run: cat $GITHUB_EVENT_PATH
- name: Deploy development build via Fastlane
uses: maierj/[email protected]
env:
ANDROID_SIGNING_ALIAS: ${{ secrets.ANDROID_SIGNING_ALIAS }}
ANDROID_SIGNING_KEY_PASSWORD: ${{ secrets.ANDROID_SIGNING_KEY_PASSWORD }}
ANDROID_SIGNING_STORE_PASSWORD: ${{ secrets.ANDROID_SIGNING_STORE_PASSWORD }}
FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT_CREDS_B64: ${{ secrets.FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT_CREDS_B64 }}
SDK_VERSION: ${{ steps.latest-sdk-version-step.outputs.LATEST_TAG }}
with:
lane: 'android build_sample_app_for_sdk_release'
subdirectory: "samples/java_layout"
options: '{ "sdk_version": "${{ env.SDK_VERSION }}" }'