Skip to content

Build and deploy

Build and deploy #4

Workflow file for this run

name: Build and deploy
on:
workflow_dispatch:
jobs:
Build_and_Deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Java 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Install npm dependency
run: yarn install
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Print working directory
run: |
echo "Current working directory: $(pwd)"
echo "Keystore will be saved to: $(pwd)/android/app/friendly_plans_upload.keystore"
- name: Decode and save keystore file
env:
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
run: |
echo "$KEYSTORE_BASE64" | base64 -d > android/app/friendly_plans_upload.keystore
echo "Keystore saved at: $(pwd)/android/app/friendly_plans_upload.keystore"
ls -al android/app
- name: Build release AAB
env:
KEYSTORE_PATH: android/app/friendly_plans_upload.keystore
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
run: |
cd android # Enter the android directory
./gradlew bundleRelease # Build the AAB instead of APK
- name: Upload release AAB
uses: actions/upload-artifact@v3
with:
name: release-aab
path: android/app/build/outputs/apk/release/app-release.aab