name: Android Release Build on: push: tags: - 'v*' jobs: build: name: Build and Create Release runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v3 with: fetch-depth: 0 # Fetch all history for proper versioning - name: Set up JDK 17 uses: actions/setup-java@v3 with: java-version: '17' distribution: 'temurin' cache: gradle - name: Setup Android SDK uses: android-actions/setup-android@v2 - name: Setup Gradle uses: gradle/gradle-build-action@v2 with: gradle-version: wrapper # Generate Gradle wrapper if it's missing - name: Generate Gradle Wrapper if Needed run: | if [ ! -f ./gradle/wrapper/gradle-wrapper.jar ]; then echo "Gradle wrapper JAR not found, generating it..." gradle wrapper fi - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build with Gradle run: ./gradlew assembleRelease # List available build tools to help with debugging - name: List Android SDK build tools run: ls -la $ANDROID_HOME/build-tools/ - name: Sign APK uses: r0adkll/sign-android-release@v1 id: sign_app with: releaseDirectory: app/build/outputs/apk/release signingKeyBase64: ${{ secrets.SIGNING_KEY }} alias: ${{ secrets.KEY_ALIAS }} keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} keyPassword: ${{ secrets.KEY_PASSWORD }} env: BUILD_TOOLS_VERSION: "34.0.0" # Updated to a version that's likely available - name: Get the version id: get_version run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT - name: Rename APK with version run: | cp ${{ steps.sign_app.outputs.signedReleaseFile }} SimpleLogUpload-${{ steps.get_version.outputs.VERSION }}.apk - name: Create Release id: create_release uses: softprops/action-gh-release@v1 with: tag_name: ${{ github.ref }} name: SimpleLogUpload ${{ steps.get_version.outputs.VERSION }} draft: false prerelease: false files: | SimpleLogUpload-${{ steps.get_version.outputs.VERSION }}.apk app/build/outputs/apk/release/app-release-unsigned.apk body: | # SimpleLogUpload ${{ steps.get_version.outputs.VERSION }} Android client written in Java to easily upload files, including Samsung dumpstate files. ## Installation Download and install the APK file on your Android device. ## Requirements - Android 14+ - SimpleFileUpload-Server for handling the uploaded files