Skip to content

create android build test 36 #36

create android build test 36

create android build test 36 #36

name: Android Build
on:
workflow_dispatch:
push:
jobs:
create-android-build:
runs-on: self-hosted
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: aarch64-linux-android
- name: Print config.toml contents
run: cat ~/.cargo/config.toml
- name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Install libpq
run: brew install libpq
- name: Set up NDK
run: echo "export NDK_BIN=~/Library/Android/sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/darwin-x86_64/bin/" >> ~/.zshrc
- name: Read .nvmrc
run: echo "##[set-output name=NVMRC;]$(cat ./client/.nvmrc)"
id: nvm
- name: Use Node.js (.nvmrc)
uses: actions/setup-node@v1
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"
- name: Install deps
uses: borales/actions-yarn@v4
with:
cmd: install
dir: 'client'
env:
NODE_AUTH_TOKEN: ${{secrets.TOKEN_REPO}}
- name: Check Yarn
uses: borales/actions-yarn@v4
with:
cmd: --version
- name: Clear Yarn cache
run: /opt/homebrew/bin/yarn cache clean
- name: Print config.toml contents
run: cat ~/.cargo/config.toml
- name: Get tag
id: tag
run: |
TAG=$(git describe --tags --abbrev=0)
echo "Latest tag: $TAG"
- name: Get Properties
id: properties
run: |
cp "$HOME/android/local.properties" ./client/packages/android
cp "$HOME/android/release.keystore" ./client/packages/android/app
- name: Print config.toml contents
run: cat ~/.cargo/config.toml
- name: Build Android App
uses: borales/actions-yarn@v4
with:
cmd: android:build:release
dir: 'client'
- name: Create the Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ steps.tag.outputs.TAG }}.apk
path: ./client/packages\android\app\build\outputs\apk\release\
retention-days: 3
outputs:
tag: ${{ steps.tag.outputs.TAG }}