Skip to content

build-example-android #10

build-example-android

build-example-android #10

name: build-example-android
on: workflow_dispatch
jobs:
build-and-upload:
runs-on: ubuntu-latest
env:
TEST_ENDPOINT: hardware-example.onekeytest.com
PROJECT_PATH: packages/connect-examples/expo-example/android
steps:
- uses: actions/checkout@v3
- name: Use Node.js 20
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'zulu'
- name: Install dependencies
run: |
yarn setup
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build APK
run: |
chmod +x gradlew
./gradlew assembleRelease
working-directory: ${{ env.PROJECT_PATH }}
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: example-android
path: |
./${{ env.PROJECT_PATH }}/app/build/outputs/**/*.apk