Skip to content

Fix: Comments

Fix: Comments #56

Workflow file for this run

name: Build and deploy for prod
on: [push]
jobs:
android-build:
name: Android main Build
runs-on: ubuntu-latest
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
- name: Checkout repo from main branch
uses: actions/[email protected]
with:
ref: feat/android-workflow
- 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/[email protected]
- uses: actions/[email protected]
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 }}
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 }}
run: |
cd android
./gradlew bundleRelease
- name: get version
id: version
uses: notiz-dev/github-action-json-property@release
with:
path: 'package.json'
prop_path: 'version'
- name: get version code
id: versionCode
uses: notiz-dev/github-action-json-property@release
with:
path: 'package.json'
prop_path: 'versionCode'
- name: Upload App bundle to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
release_name: 'v${{steps.version.outputs.prop}}-${{steps.versionCode.outputs.prop}}'
file: ./android/app/build/outputs/bundle/release/app-release.aab
asset_name: app-release.aab
tag: 'v${{steps.version.outputs.prop}}'
overwrite: true
body: |
Release version ${{steps.version.outputs.prop}}
Fix:
- Test
- Test
- Test