name: Releases on: push: tags: - "*" jobs: linux: name: 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 Rust Toolchain run: rustup update && rustup target add armv7-linux-androideabi aarch64-linux-android i686-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 app/src/main/cpp/nettle/nettle key: ${{ runner.os }}-cmake-${{ hashFiles('gradle/libs.versions.toml', 'app/build.gradle.kts', 'app/src/main/cpp/CMakeLists.txt') }} restore-keys: ${{ runner.os }}-cmake- - name: Gradle Build uses: gradle/actions/setup-gradle@v3 with: arguments: assembleRelease - name: Rename Apks run: | mv app/build/outputs/apk/defaultOss/release/app-default-oss-universal-release.apk EhViewer-${{ github.ref_name }}-default-oss-universal.apk mv app/build/outputs/apk/defaultOss/release/app-default-oss-arm64-v8a-release.apk EhViewer-${{ github.ref_name }}-default-oss-arm64-v8a.apk mv app/build/outputs/apk/defaultOss/release/app-default-oss-x86_64-release.apk EhViewer-${{ github.ref_name }}-default-oss-x86_64.apk mv app/build/outputs/apk/defaultOss/release/app-default-oss-x86-release.apk EhViewer-${{ github.ref_name }}-default-oss-x86.apk mv app/build/outputs/apk/defaultOss/release/app-default-oss-armeabi-v7a-release.apk EhViewer-${{ github.ref_name }}-default-oss-armeabi-v7a.apk mv app/build/outputs/mapping/defaultOssRelease/mapping.txt EhViewer-${{ github.ref_name }}-default-oss-mapping.txt mv app/build/outputs/native-debug-symbols/defaultOssRelease/native-debug-symbols.zip EhViewer-${{ github.ref_name }}-default-oss-native-debug-symbols.zip mv app/build/outputs/apk/defaultGms/release/app-default-gms-universal-release.apk EhViewer-${{ github.ref_name }}-default-gms-universal.apk mv app/build/outputs/apk/defaultGms/release/app-default-gms-arm64-v8a-release.apk EhViewer-${{ github.ref_name }}-default-gms-arm64-v8a.apk mv app/build/outputs/apk/defaultGms/release/app-default-gms-x86_64-release.apk EhViewer-${{ github.ref_name }}-default-gms-x86_64.apk mv app/build/outputs/apk/defaultGms/release/app-default-gms-x86-release.apk EhViewer-${{ github.ref_name }}-default-gms-x86.apk mv app/build/outputs/apk/defaultGms/release/app-default-gms-armeabi-v7a-release.apk EhViewer-${{ github.ref_name }}-default-gms-armeabi-v7a.apk mv app/build/outputs/mapping/defaultGmsRelease/mapping.txt EhViewer-${{ github.ref_name }}-default-gms-mapping.txt mv app/build/outputs/native-debug-symbols/defaultGmsRelease/native-debug-symbols.zip EhViewer-${{ github.ref_name }}-default-gms-native-debug-symbols.zip mv app/build/outputs/apk/marshmallowOss/release/app-marshmallow-oss-universal-release.apk EhViewer-${{ github.ref_name }}-marshmallow-oss-universal.apk mv app/build/outputs/apk/marshmallowOss/release/app-marshmallow-oss-arm64-v8a-release.apk EhViewer-${{ github.ref_name }}-marshmallow-oss-arm64-v8a.apk mv app/build/outputs/apk/marshmallowOss/release/app-marshmallow-oss-x86_64-release.apk EhViewer-${{ github.ref_name }}-marshmallow-oss-x86_64.apk mv app/build/outputs/apk/marshmallowOss/release/app-marshmallow-oss-x86-release.apk EhViewer-${{ github.ref_name }}-marshmallow-oss-x86.apk mv app/build/outputs/apk/marshmallowOss/release/app-marshmallow-oss-armeabi-v7a-release.apk EhViewer-${{ github.ref_name }}-marshmallow-oss-armeabi-v7a.apk mv app/build/outputs/mapping/marshmallowOssRelease/mapping.txt EhViewer-${{ github.ref_name }}-marshmallow-oss-mapping.txt mv app/build/outputs/native-debug-symbols/marshmallowOssRelease/native-debug-symbols.zip EhViewer-${{ github.ref_name }}-marshmallow-oss-native-debug-symbols.zip mv app/build/outputs/apk/marshmallowGms/release/app-marshmallow-gms-universal-release.apk EhViewer-${{ github.ref_name }}-marshmallow-gms-universal.apk mv app/build/outputs/apk/marshmallowGms/release/app-marshmallow-gms-arm64-v8a-release.apk EhViewer-${{ github.ref_name }}-marshmallow-gms-arm64-v8a.apk mv app/build/outputs/apk/marshmallowGms/release/app-marshmallow-gms-x86_64-release.apk EhViewer-${{ github.ref_name }}-marshmallow-gms-x86_64.apk mv app/build/outputs/apk/marshmallowGms/release/app-marshmallow-gms-x86-release.apk EhViewer-${{ github.ref_name }}-marshmallow-gms-x86.apk mv app/build/outputs/apk/marshmallowGms/release/app-marshmallow-gms-armeabi-v7a-release.apk EhViewer-${{ github.ref_name }}-marshmallow-gms-armeabi-v7a.apk mv app/build/outputs/mapping/marshmallowGmsRelease/mapping.txt EhViewer-${{ github.ref_name }}-marshmallow-gms-mapping.txt mv app/build/outputs/native-debug-symbols/marshmallowGmsRelease/native-debug-symbols.zip EhViewer-${{ github.ref_name }}-marshmallow-gms-native-debug-symbols.zip - name: Releases uses: softprops/action-gh-release@v1 with: body: Bump Version files: | EhViewer-${{ github.ref_name }}-default-oss-universal.apk EhViewer-${{ github.ref_name }}-default-oss-arm64-v8a.apk EhViewer-${{ github.ref_name }}-default-oss-x86_64.apk EhViewer-${{ github.ref_name }}-default-oss-x86.apk EhViewer-${{ github.ref_name }}-default-oss-armeabi-v7a.apk EhViewer-${{ github.ref_name }}-default-oss-mapping.txt EhViewer-${{ github.ref_name }}-default-oss-native-debug-symbols.zip EhViewer-${{ github.ref_name }}-default-gms-universal.apk EhViewer-${{ github.ref_name }}-default-gms-arm64-v8a.apk EhViewer-${{ github.ref_name }}-default-gms-x86_64.apk EhViewer-${{ github.ref_name }}-default-gms-x86.apk EhViewer-${{ github.ref_name }}-default-gms-armeabi-v7a.apk EhViewer-${{ github.ref_name }}-default-gms-mapping.txt EhViewer-${{ github.ref_name }}-default-gms-native-debug-symbols.zip EhViewer-${{ github.ref_name }}-marshmallow-oss-universal.apk EhViewer-${{ github.ref_name }}-marshmallow-oss-arm64-v8a.apk EhViewer-${{ github.ref_name }}-marshmallow-oss-x86_64.apk EhViewer-${{ github.ref_name }}-marshmallow-oss-x86.apk EhViewer-${{ github.ref_name }}-marshmallow-oss-armeabi-v7a.apk EhViewer-${{ github.ref_name }}-marshmallow-oss-mapping.txt EhViewer-${{ github.ref_name }}-marshmallow-oss-native-debug-symbols.zip EhViewer-${{ github.ref_name }}-marshmallow-gms-universal.apk EhViewer-${{ github.ref_name }}-marshmallow-gms-arm64-v8a.apk EhViewer-${{ github.ref_name }}-marshmallow-gms-x86_64.apk EhViewer-${{ github.ref_name }}-marshmallow-gms-x86.apk EhViewer-${{ github.ref_name }}-marshmallow-gms-armeabi-v7a.apk EhViewer-${{ github.ref_name }}-marshmallow-gms-mapping.txt EhViewer-${{ github.ref_name }}-marshmallow-gms-native-debug-symbols.zip