Skip to content

App Distribute CI

App Distribute CI #171

name: App Distribute CI
on:
workflow_run:
workflows: ["ReleasePost", "PublishHotfix"]
types:
- completed
jobs:
build_ui_components_sample_app:
name: Build and push to S3
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- name: Set up JDK 17
uses: actions/[email protected]
with:
distribution: adopt
java-version: 17
- name: Prepare environment
run: |
git fetch --unshallow
echo "${{ secrets.RELEASE_KEYSTORE }}" > .sign/release.keystore.asc
gpg -d --passphrase "${{ secrets.PASSPHRASE }}" --batch .sign/release.keystore.asc > .sign/release.keystore
echo "${{ secrets.RELEASE_KEYSTORE_PROPERTIES }}" > .sign/keystore.properties.asc
gpg -d --passphrase "${{ secrets.PASSPHRASE }}" --batch .sign/keystore.properties.asc > .sign/keystore.properties
- name: Assemble
run: ./gradlew :stream-chat-android-ui-components-sample:assembleDemoRelease --stacktrace
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Upload APK
run: aws s3 cp stream-chat-android-ui-components-sample/build/outputs/apk/demo/release/stream-chat-android-ui-components-sample-demo-release.apk s3://${{ secrets.AWS_S3_BUCKET }} --sse AES256