Android APK build CD #84
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: Android APK build CD | |
on: | |
# Allows you to run this workflow manually from the Actions a tab | |
workflow_dispatch: | |
jobs: | |
android-build: | |
name: android-build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout to git repository | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ matrix.java-version }} | |
- name: Decode signing certificate into a file | |
working-directory: './apps/wallet/instance/main' | |
env: | |
CERTIFICATE_BASE64: ${{ secrets.ANDROID_DIST_SIGNING_KEY }} | |
run: | | |
echo $CERTIFICATE_BASE64 | base64 --decode > google-release.keystore | |
- name: Decode service account into a file | |
working-directory: './apps/wallet/instance/main' | |
env: | |
CREDENTIALS: ${{ secrets.ANDROID_PUBLISHER_CREDENTIALS }} | |
run: | | |
echo $CREDENTIALS > service-account.json | |
- name: Build android apk | |
working-directory: './apps/wallet/instance/main' | |
run: bundle exec fastlane android apk | |
env: | |
KEYSTORE_FILE: ${{ github.workspace }}/apps/wallet/instance/main/google-release.keystore | |
KEYSTORE_PASSWORD: ${{ secrets.TONKEEPER_UPLOAD_STORE_PASSWORD }} | |
KEY_ALIAS: ${{ secrets.TONKEEPER_UPLOAD_KEY_ALIAS}} | |
KEY_PASSWORD: ${{ secrets.TONKEEPER_UPLOAD_KEY_PASSWORD }} | |
ANDROID_JSON_KEY_FILE: service-account.json | |
- name: Upload android apk to artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Tonkeeper apk ${{ env.VERSION_CODE }} | |
path: | | |
${{ github.workspace }}/apps/wallet/instance/main/build/outputs |