Skip to content

Version v1.0.2

Version v1.0.2 #48

Workflow file for this run

name: Build Mobile
on:
workflow_dispatch:
workflow_call:
inputs:
ref:
required: false
type: string
pull_request:
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-sign-android:
name: Build and sign Android
# Skip when PR from a fork
if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
steps:
- name: Determine ref
id: get-ref
run: |
input_ref="${{ inputs.ref }}"
github_ref="${{ github.sha }}"
ref="${input_ref:-$github_ref}"
echo "ref=$ref" >> $GITHUB_OUTPUT
- uses: actions/checkout@v4
with:
ref: ${{ steps.get-ref.outputs.ref }}
- uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "17.x"
cache: "gradle"
- name: Create the Keystore
env:
KEYSTORE_B64: ${{ secrets.KEYSTORE_B64 }}
run: echo "$KEYSTORE_B64" | base64 -d > android/key.keystore
- uses: oven-sh/setup-bun@v1
- run: bun install
- run: bun run build
- run: bunx cap sync android
- name: Build Android App Bundle
env:
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
ANDROID_STORE_PASSWORD: ${{ secrets.ANDROID_STORE_PASSWORD }}
run: ./gradlew assembleRelease bundleRelease
working-directory: android
- name: Publish Android APK
uses: actions/upload-artifact@v4
with:
name: release-apk-signed
path: android/app/build/outputs/apk/release/*.apk
- name: Publish Android AAB
uses: actions/upload-artifact@v4
with:
name: release-aab-signed
path: android/app/build/outputs/bundle/release/*.aab