-
Notifications
You must be signed in to change notification settings - Fork 106
52 lines (44 loc) · 1.67 KB
/
android.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Android build
on:
workflow_dispatch:
inputs:
name:
description: "Release-Build"
default: "Build Android companion app"
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout project code
- name: Checking out branch
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
with:
# Use sparse checkout to only select files in mobile app directory
# Turning off cone mode ensures that files in the project root are not included during checkout
sparse-checkout: 'companionapp/android'
sparse-checkout-cone-mode: false
# This step is needed because expo-github-action does not support paths.
# Therefore all mobile app assets should be moved to the project root.
- name: Move mobile app files to root
run: |
ls -lah
shopt -s dotglob
mv companionapp/android/* .
ls -lah
- name: Setup Java
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b #v4.6.0
with:
distribution: 'temurin'
java-version: 17
- name: Setup Android SDK
uses: android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407 #v3.2.2
- name: Build Debug apk
run: ./gradlew assembleDebug --stacktrace
- name: Get apk path
id: debugApk
run: echo "apkfile=$(find app/build/outputs/apk/debug/*.apk)" >> $GITHUB_OUTPUT
- name: Upload Debug Build to Artifacts
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 #v4.6.0
with:
name: debug-apk
path: ${{ steps.debugApk.outputs.apkfile }}