Skip to content

Commit

Permalink
Update github CI actions
Browse files Browse the repository at this point in the history
  • Loading branch information
evilpan committed Feb 6, 2024
1 parent 5364ab9 commit 7057269
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 7 deletions.
66 changes: 59 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,65 @@ on:
branches: [ master ]

jobs:
build:

build_apk:
name: Generate APK
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'oracle'
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@v4
- 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:
- uses: actions/checkout@v2
- name: preinstall
run: pip3 install -r requirements.txt
- name: test
run: ./extract_jni.py demo/app-debug.apk
- 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

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ cd demo_apk
- [x] support overloaded JNI functions
- [x] remove Jadx dependence, all in Python
- [ ] support [env->RegisterNatives][reg] JNI functions
- [ ] Add BinaryNinja plugin

# LINKS

Expand Down

0 comments on commit 7057269

Please sign in to comment.