Build Ad-Hoc Sample App #114
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Ad-Hoc Sample App | |
on: | |
workflow_dispatch: | |
inputs: | |
smile_config: | |
description: 'The contents of the smile_config.json file (default: Partner 2423)' | |
required: false | |
changelog: | |
description: 'Description of changes or test instructions' | |
required: false | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
environment: Play Store Internal App Sharing | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: Write Smile Config | |
id: write_smile_config | |
# Mask the config so it doesn't show up in the logs | |
run: | | |
INPUT_SMILE_CONFIG=$(jq -r '.inputs.smile_config // empty' $GITHUB_EVENT_PATH) | |
echo "::add-mask::$INPUT_SMILE_CONFIG" | |
if [ -n "$INPUT_SMILE_CONFIG" ]; then | |
SMILE_CONFIG="$INPUT_SMILE_CONFIG" | |
fi | |
echo "$SMILE_CONFIG" > sample/src/main/assets/smile_config.json | |
PARTNER_ID=$(jq -r '.partner_id' sample/src/main/assets/smile_config.json) | |
echo "partner_id=$PARTNER_ID" >> $GITHUB_OUTPUT | |
env: | |
SMILE_CONFIG: ${{ secrets.SMILE_CONFIG_PARTNER_2423 }} | |
- name: Decode Keystore | |
id: decode_keystore | |
uses: timheuer/base64-to-file@v1 | |
with: | |
fileName: 'upload.jks' | |
fileDir: './sample' | |
encodedString: ${{ secrets.UPLOAD_KEYSTORE }} | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Bundle | |
run: ./gradlew bundleRelease | |
env: | |
ORG_GRADLE_PROJECT_SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
ORG_GRADLE_PROJECT_uploadKeystorePassword: ${{ secrets.UPLOAD_KEYSTORE_PASSWORD }} | |
- name: Create Internal App Sharing Link | |
uses: r0adkll/upload-google-play@v1 | |
id: upload | |
with: | |
serviceAccountJsonPlainText: ${{ secrets.PLAY_STORE_SERVICE_ACCOUNT_JSON }} | |
packageName: com.smileidentity.sample | |
track: internalsharing | |
releaseFiles: sample/build/outputs/bundle/release/sample-release.aab | |
releaseName: Smile ID (Partner ${{ steps.write_smile_config.outputs.partner_id }}) | |
- name: Send Slack | |
uses: slackapi/[email protected] | |
with: | |
payload: | | |
{ | |
"play_store_url": "${{ steps.upload.outputs.internalSharingDownloadUrl }}", | |
"partner_id": "${{ steps.write_smile_config.outputs.partner_id }}", | |
"branch": "${{ github.ref }}", | |
"commit_sha": "${{ github.sha }}", | |
"changelog": "${{ github.event.inputs.changelog }}" | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_SAMPLE_APP_DOWNLOAD }} |