|
7 | 7 | branches: [ master ]
|
8 | 8 |
|
9 | 9 | jobs:
|
10 |
| - build: |
11 |
| - |
| 10 | + build_apk: |
| 11 | + name: Generate APK |
| 12 | + runs-on: ubuntu-latest |
| 13 | + steps: |
| 14 | + - name: Checkout |
| 15 | + uses: actions/checkout@v1 |
| 16 | + - name: Setup JDK |
| 17 | + uses: actions/setup-java@v1 |
| 18 | + with: |
| 19 | + java-version: 1.8 |
| 20 | + - name: Build APK |
| 21 | + run: cd demo_apk && bash ./gradlew assembleDebug --stacktrace |
| 22 | + - name: Upload APK |
| 23 | + uses: actions/upload-artifact@v1 |
| 24 | + with: |
| 25 | + name: demoapk |
| 26 | + path: app/build/outputs/apk/debug/app-debug.apk |
| 27 | + test: |
| 28 | + name: Test JNI extraction |
| 29 | + needs: build_apk |
12 | 30 | runs-on: ubuntu-latest
|
| 31 | + steps: |
| 32 | + - uses: actions/checkout@v1 |
| 33 | + - name: Download APK from build |
| 34 | + uses: actions/download-artifact@v1 |
| 35 | + with: |
| 36 | + name: demoapk |
| 37 | + - name: preinstall |
| 38 | + run: pip3 install -r requirements.txt |
| 39 | + - name: test |
| 40 | + run: ./extract_jni.py demoapk/app-debug.apk |
13 | 41 |
|
| 42 | + release: |
| 43 | + name: release APK |
| 44 | + needs: demoapk |
| 45 | + if: startsWith(github.ref, 'refs/tags/v') |
| 46 | + runs-on: ubuntu-latest |
14 | 47 | steps:
|
15 |
| - - uses: actions/checkout@v2 |
16 |
| - - name: preinstall |
17 |
| - run: pip3 install -r requirements.txt |
18 |
| - - name: test |
19 |
| - run: ./extract_jni.py demo/app-debug.apk |
| 48 | + - name: Download APK from build |
| 49 | + uses: actions/download-artifact@v1 |
| 50 | + with: |
| 51 | + name: demoapk |
| 52 | + - name: Create Release |
| 53 | + id: create_release |
| 54 | + uses: actions/create-release@v1 |
| 55 | + env: |
| 56 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 57 | + with: |
| 58 | + tag_name: ${{ github.ref }} |
| 59 | + release_name: Release ${{ github.ref }} |
| 60 | + - name: Upload Release APK |
| 61 | + id: upload_release_asset |
| 62 | + |
| 63 | + env: |
| 64 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 65 | + with: |
| 66 | + upload_url: ${{ steps.create_release.outputs.upload_url }} |
| 67 | + asset_path: demoapk/app-debug.apk |
| 68 | + asset_name: DemoJNI-debug.apk |
| 69 | + asset_content_type: application/zip |
| 70 | + |
0 commit comments