-
Notifications
You must be signed in to change notification settings - Fork 15
69 lines (66 loc) · 2.24 KB
/
build-debug.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: build debug
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: "11"
distribution: "adopt"
cache: "gradle"
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '19'
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: "1.21.x"
- name: Setup Android SDK
uses: android-actions/setup-android@v3
with:
cmdline-tools-version: 8512546
- name: NDK Cache
id: ndk-cache
uses: actions/cache@v3
with:
path: /usr/local/lib/android/sdk/ndk
key: ndk-cache-23.1.7779620
- name: Setup NDK
run: /usr/local/lib/android/sdk/cmdline-tools/7.0/bin/sdkmanager --install "ndk;23.1.7779620"
- name: Checkout netbird repository
uses: actions/checkout@v3
with:
repository: netbirdio/netbird
ref: main
path: netbird
- name: install gomobile
run: go install golang.org/x/mobile/cmd/[email protected]
- name: build android nebtird lib
run: PATH=$PATH:$(go env GOPATH)/bin bash -x build-android-lib.sh $GITHUB_WORKSPACE/netbird
env:
ANDROID_NDK_HOME: /usr/local/lib/android/sdk/ndk/23.1.7779620
- name: add react-native lib
run: yarn add file:./react/netbird-lib
- name: yarn install deps
run: yarn install
- name: npx reacti-native bundle
run: npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
- name: create empty local.properties
run: touch android/local.properties
- name: build debug apk
run: cd android && ./gradlew assembleDebug
- name: upload non tags for debug purposes
uses: actions/upload-artifact@v2
with:
name: debug-apk
path: android/app/build/outputs/apk/debug/app-debug.apk
retention-days: 1