-
Notifications
You must be signed in to change notification settings - Fork 6
71 lines (69 loc) · 2.65 KB
/
build_app.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
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: Assemble
uses: gradle/actions/setup-gradle@v3
with:
arguments: 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 }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_SAMPLE_APP_DOWNLOAD }}