Add hardcoded DNS server (#18) #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |