Merge #13
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: Develop build | |
on: | |
push: | |
branches: | |
- develop | |
jobs: | |
android-build: | |
name: Android main Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel previous runs | |
uses: styfle/cancel-workflow-action@0.12.1 | |
- name: Checkout repo from main branch | |
uses: actions/checkout@v4.0.0 | |
with: | |
ref: develop | |
- name: Install npm dependency | |
run: npm install | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: zulu | |
java-version: '17' | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v3.0.0 | |
- uses: actions/cache@v4.0.0 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v3 | |
- name: Decode Keystore | |
env: | |
KEYSTORE: ${{ secrets.KEYSTORE }} | |
MYAPP_UPLOAD_STORE_FILE: ${{ secrets.MYAPP_UPLOAD_STORE_FILE }} | |
run: | | |
cd android/app | |
echo $KEYSTORE > keystore-b64.txt | |
base64 -d keystore-b64.txt > $MYAPP_UPLOAD_STORE_FILE | |
- name: Build Release apk | |
env: | |
MYAPP_UPLOAD_STORE_FILE: ${{ secrets.MYAPP_UPLOAD_STORE_FILE }} | |
MYAPP_UPLOAD_KEY_ALIAS: ${{ secrets.MYAPP_UPLOAD_KEY_ALIAS }} | |
MYAPP_UPLOAD_KEY_PASSWORD: ${{ secrets.MYAPP_UPLOAD_KEY_PASSWORD }} | |
MYAPP_UPLOAD_STORE_PASSWORD: ${{ secrets.MYAPP_UPLOAD_STORE_PASSWORD }} | |
HOST: ${{ secrets.HOST }} | |
JAWG_API_KEY: ${{ secrets.JAWG_API_KEY }} | |
MAPBOX_API_KEY: ${{ secrets.MAPBOX_API_KEY }} | |
run: | | |
cd android | |
./gradlew assembleRelease | |
- name: Build Release bundle | |
env: | |
MYAPP_UPLOAD_STORE_FILE: ${{ secrets.MYAPP_UPLOAD_STORE_FILE }} | |
MYAPP_UPLOAD_KEY_ALIAS: ${{ secrets.MYAPP_UPLOAD_KEY_ALIAS }} | |
MYAPP_UPLOAD_KEY_PASSWORD: ${{ secrets.MYAPP_UPLOAD_KEY_PASSWORD }} | |
MYAPP_UPLOAD_STORE_PASSWORD: ${{ secrets.MYAPP_UPLOAD_STORE_PASSWORD }} | |
HOST: ${{ secrets.HOST }} | |
JAWG_API_KEY: ${{ secrets.JAWG_API_KEY }} | |
MAPBOX_API_KEY: ${{ secrets.MAPBOX_API_KEY }} | |
run: | | |
cd android | |
./gradlew bundleRelease |