name: Releases on: push: tags: - "*" jobs: build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Java uses: actions/setup-java@v4 with: distribution: temurin java-version: 21 - name: Install NDK run: echo "y" | ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --install "ndk;27.0.11718014" - name: Install Rust Toolchain run: rustup update && rustup target add armv7-linux-androideabi aarch64-linux-android x86_64-linux-android - name: Rust Cache uses: Swatinem/rust-cache@v2 with: workspaces: "./app/src/main/rust" - name: CMake Cache uses: actions/cache@v4 with: path: app/.cxx key: cmake-${{ hashFiles('gradle/libs.versions.toml', 'app/build.gradle.kts', 'app/src/main/cpp/CMakeLists.txt') }} restore-keys: cmake- - name: Gradle Build uses: gradle/actions/setup-gradle@v3 with: arguments: assembleRelease - name: Rename Apks run: | mv app/build/outputs/apk/default/release/app-default-universal-release.apk EhViewer-${{ github.ref_name }}-default-universal.apk mv app/build/outputs/apk/default/release/app-default-arm64-v8a-release.apk EhViewer-${{ github.ref_name }}-default-arm64-v8a.apk mv app/build/outputs/apk/default/release/app-default-x86_64-release.apk EhViewer-${{ github.ref_name }}-default-x86_64.apk mv app/build/outputs/apk/default/release/app-default-armeabi-v7a-release.apk EhViewer-${{ github.ref_name }}-default-armeabi-v7a.apk mv app/build/outputs/mapping/defaultRelease/mapping.txt EhViewer-${{ github.ref_name }}-default-mapping.txt mv app/build/outputs/native-debug-symbols/defaultRelease/native-debug-symbols.zip EhViewer-${{ github.ref_name }}-default-native-debug-symbols.zip mv app/build/outputs/apk/marshmallow/release/app-marshmallow-universal-release.apk EhViewer-${{ github.ref_name }}-marshmallow-universal.apk mv app/build/outputs/apk/marshmallow/release/app-marshmallow-arm64-v8a-release.apk EhViewer-${{ github.ref_name }}-marshmallow-arm64-v8a.apk mv app/build/outputs/apk/marshmallow/release/app-marshmallow-x86_64-release.apk EhViewer-${{ github.ref_name }}-marshmallow-x86_64.apk mv app/build/outputs/apk/marshmallow/release/app-marshmallow-armeabi-v7a-release.apk EhViewer-${{ github.ref_name }}-marshmallow-armeabi-v7a.apk mv app/build/outputs/mapping/marshmallowRelease/mapping.txt EhViewer-${{ github.ref_name }}-marshmallow-mapping.txt mv app/build/outputs/native-debug-symbols/marshmallowRelease/native-debug-symbols.zip EhViewer-${{ github.ref_name }}-marshmallow-native-debug-symbols.zip - name: Releases uses: softprops/action-gh-release@v2 with: body: Bump Version files: | EhViewer-${{ github.ref_name }}-default-universal.apk EhViewer-${{ github.ref_name }}-default-arm64-v8a.apk EhViewer-${{ github.ref_name }}-default-x86_64.apk EhViewer-${{ github.ref_name }}-default-armeabi-v7a.apk EhViewer-${{ github.ref_name }}-default-mapping.txt EhViewer-${{ github.ref_name }}-default-native-debug-symbols.zip EhViewer-${{ github.ref_name }}-marshmallow-universal.apk EhViewer-${{ github.ref_name }}-marshmallow-arm64-v8a.apk EhViewer-${{ github.ref_name }}-marshmallow-x86_64.apk EhViewer-${{ github.ref_name }}-marshmallow-armeabi-v7a.apk EhViewer-${{ github.ref_name }}-marshmallow-mapping.txt EhViewer-${{ github.ref_name }}-marshmallow-native-debug-symbols.zip