This repository was archived by the owner on Aug 6, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (55 loc) · 1.94 KB
/
android-build.yml
File metadata and controls
65 lines (55 loc) · 1.94 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Android Build ## name of the workflow
on:
workflow_dispatch: # trigger the workflow manually
push: # trigger the workflow on push event
paths-ignore:
- '**.md'
- '**.json'
- '**.lock'
- '**.yml'
- '**.yaml'
branches: [ main ] # trigger the workflow on push to main branch
jobs:
android-build:
name: Android Build
runs-on: ubuntu-latest # using ubuntu latest version / or you can use a specific version
steps:
- name: Check out Git repository # clone the repo to local ci workspace
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: yarn
- name: Set up our JDK environment # setup JDK environment: mandatory as we need to build android project
uses: actions/setup-java@v1.4.3
with:
java-version: 17
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Restore node_modules from cache
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Setup Expo
uses: expo/expo-github-action@v7
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Install Android SDK
uses: android-actions/setup-android@v2
- name: Build Android APK
run: eas build --platform android --profile preview --local --non-interactive
- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: app-release.apk
path: /home/runner/work/imageing/imageing/build-*.apk