Fix CI #19
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: CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build_apk: | |
name: Generate APK | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Setup JDK | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 17 | |
- name: Build APK | |
run: cd demo_apk && bash ./gradlew assembleDebug --stacktrace | |
- name: Upload APK | |
uses: actions/upload-artifact@v1 | |
with: | |
name: demoapk | |
path: demo_apk/app/build/outputs/apk/debug/app-debug.apk | |
test: | |
name: Test JNI extraction | |
needs: build_apk | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Download APK from build | |
uses: actions/download-artifact@v1 | |
with: | |
name: demoapk | |
- name: preinstall | |
run: pip3 install -r requirements.txt | |
- name: test | |
run: ./extract_jni.py demoapk/app-debug.apk | |
release: | |
name: release APK | |
needs: build_apk | |
if: startsWith(github.ref, 'refs/tags/v') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download APK from build | |
uses: actions/download-artifact@v1 | |
with: | |
name: demoapk | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
- name: Upload Release APK | |
id: upload_release_asset | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: demoapk/app-debug.apk | |
asset_name: DemoJNI-debug.apk | |
asset_content_type: application/zip | |