feat: save debug logs to file #24
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 | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout android | |
uses: actions/checkout@v4 | |
with: | |
path: android | |
- name: Checkout nwcompat | |
uses: actions/checkout@v4 | |
with: | |
repository: fifomori/nwcompat | |
path: nwcompat | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: latest | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
cache: gradle | |
- name: Build nwcompat | |
run: | | |
cd nwcompat | |
pnpm install | |
pnpm build | |
- name: Copy nwcompat bundle to android | |
run: | | |
cp nwcompat/nwcompat.js nwcompat/nwcompat-loader.js nwcompat/dist/* android/app/src/main/assets | |
- name: Build apk | |
env: | |
STORE_FILE: ${{ secrets.KEYSTORE }} | |
STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }} | |
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
run: | | |
cd android | |
echo $STORE_FILE | base64 -d > keystore.jks | |
./gradlew assembleDebug --no-configuration-cache --no-daemon \ | |
-Pandroid.injected.signing.store.file=$(pwd)/keystore.jks \ | |
-Pandroid.injected.signing.store.password="$STORE_PASSWORD" \ | |
-Pandroid.injected.signing.key.alias=key0 \ | |
-Pandroid.injected.signing.key.password="$KEY_PASSWORD" | |
- name: Upload apk | |
uses: actions/upload-artifact@v4 | |
with: | |
name: app-debug.apk | |
path: android/app/build/outputs/apk/debug/app-debug.apk |