Install build-tools v.30.0.2 #13
This file contains hidden or 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: Generated APK AAB (Upload - Create Artifact To Github Action) | |
| env: | |
| main_project_module: app | |
| playstore_name: IL2CPP Inspector | |
| on: | |
| push: | |
| branches: | |
| - 'release/**' | |
| workflow_dispatch: | |
| permissions: | |
| packages: write | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set current date as env variable | |
| run: echo "date_today=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | |
| - name: Set repository name as env variable | |
| run: echo "repository_name=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV | |
| - name: Download frida-inject binaries for arm and arm64 | |
| run: | | |
| timestamp=$(date +"%Y-%m-%d %H:%M:%S") | |
| echo "current_timestamp=$timestamp" >> $GITHUB_ENV | |
| mkdir -p frida_binaries/armeabi-v7a | |
| mkdir -p frida_binaries/arm64-v8a | |
| # Download the frida-inject files | |
| curl -L https://github.com/frida/frida/releases/latest/download/frida-inject-16.6.5-android-arm.xz -o frida-inject-arm.xz | |
| curl -L https://github.com/frida/frida/releases/latest/download/frida-inject-16.6.5-android-arm64.xz -o frida-inject-arm64.xz | |
| # Extract the binaries | |
| unxz frida-inject-arm.xz | |
| unxz frida-inject-arm64.xz | |
| echo "Contents after extracting frida archives:" | |
| ls -la | |
| # Move the binaries to the appropriate directories | |
| mv frida-inject-arm frida_binaries/armeabi-v7a/libinjector.so | |
| mv frida-inject-arm64 frida_binaries/arm64-v8a/libinjector.so | |
| # Copy the binaries to the jniLibs directories | |
| cp frida_binaries/armeabi-v7a/libinjector.so $GITHUB_WORKSPACE/${{ env.main_project_module }}/src/main/jniLibs/armeabi-v7a/ | |
| cp frida_binaries/arm64-v8a/libinjector.so $GITHUB_WORKSPACE/${{ env.main_project_module }}/src/main/jniLibs/arm64-v8a/ | |
| - name: Set Up JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '17' | |
| cache: 'gradle' | |
| - name: Change wrapper permissions | |
| run: chmod +x ./gradlew | |
| # Run Tests Build | |
| # - name: Run gradle tests | |
| # run: ./gradlew test | |
| # Run Build Project | |
| # - name: Build gradle project | |
| # run: ./gradlew build | |
| # Create APK Debug | |
| # - name: Build apk debug project (APK) - ${{ env.main_project_module }} module | |
| # run: ./gradlew assembleDebug | |
| # Create APK Release | |
| - name: Build APK Release | |
| run: ./gradlew assemble | |
| # Upload Artifact Build | |
| # Noted For Output [main_project_module]/build/outputs/apk/debug/ | |
| # - name: Upload APK Debug - ${{ env.repository_name }} | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: ${{ env.date_today }} - ${{ env.playstore_name }} - ${{ env.repository_name }} - APK(s) debug generated | |
| # path: ${{ env.main_project_module }}/build/outputs/apk/debug/ | |
| # Noted For Output [main_project_module]/build/outputs/apk/release/ | |
| # - name: Upload APK Release to artifact | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: ${{ env.date_today }} - ${{ env.playstore_name }} - ${{ env.repository_name }} - APK(s) release generated | |
| # path: ${{ env.main_project_module }}/build/outputs/apk/release/ | |
| # | |
| - name: setup cmdline-tools | |
| run: | | |
| mkdir -p /usr/local/lib/android/sdk/cmdline-tools | |
| curl -o commandlinetools.zip https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip | |
| unzip -q commandlinetools.zip -d /usr/local/lib/android/sdk/cmdline-tools | |
| mv /usr/local/lib/android/sdk/cmdline-tools/cmdline-tools /usr/local/lib/android/sdk/cmdline-tools/latest | |
| rm commandlinetools.zip | |
| - name: Install Android build-tools | |
| run: | | |
| yes | /usr/local/lib/android/sdk/cmdline-tools/latest/bin/sdkmanager --sdk_root=/usr/local/lib/android/sdk "build-tools;30.0.2" --verbose --no_https | |
| - name: Sign APK with keystore | |
| uses: r0adkll/sign-android-release@v1 | |
| id: sign_app | |
| with: | |
| releaseDirectory: ${{ env.main_project_module }}/build/outputs/apk/release | |
| signingKeyBase64: ${{ secrets.KEY_STORE }} | |
| alias: ${{ secrets.KEY_STORE_ALIAS }} | |
| keyStorePassword: ${{ secrets.KEY_STORE_PASS }} | |
| keyPassword: ${{ secrets.KEY_STORE_PASS }} | |
| env: | |
| BUILD_TOOLS_VERSION: "30.0.2" | |
| - name: Upload APK Release to releases | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: ${{ env.main_project_module }}/build/outputs/apk/release/*-release.apk | |
| overwrite: true | |
| file_glob: true | |
| tag: ${{ github.ref }} | |
| prerelease: true | |
| draft: true | |
| release_name: ${{ env.playstore_name }} - ${{ env.timestamp }} |