diff --git a/.github/workflows/android-build.yml b/.github/workflows/android-build.yml index 9656338e..9018b4ce 100644 --- a/.github/workflows/android-build.yml +++ b/.github/workflows/android-build.yml @@ -25,7 +25,7 @@ jobs: with: workflow: frontend-build.yml workflow_conclusion: success - name: main-js + name: mobile-main-js path: mobile/html/Web.bundle/js/ - name: 'Install npm Dependencies' @@ -33,6 +33,20 @@ jobs: cd mobile npm install --force + - uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 11 + + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + + - name: 'Build Android Debug' + if: inputs.semver == '' # Only build debug if this is a pre-release + run: | + cd mobile/android + ./gradlew assembleDebug + - name: 'Build Android Release' run: | cd mobile/android @@ -42,7 +56,7 @@ jobs: id: commit uses: pr-mpt/actions-commit-hash@v1 - - name: 'Upload .apk Artifact (for Release)' + - name: 'Upload .apk Release Artifact (for Release)' uses: actions/upload-artifact@v3 if: inputs.semver != '' # If this workflow is called from release.yml with: @@ -56,6 +70,13 @@ jobs: name: robosats-${{ steps.commit.outputs.short }}.apk path: mobile/android/app/build/outputs/apk/release/app-release.apk + - name: 'Upload .apk Debug Artifact (for Pre-release)' + uses: actions/upload-artifact@v3 + if: inputs.semver != '' # only if this workflow is not called from a push to tag (a Release) + with: + name: robosats-debug-${{ steps.commit.outputs.short }}.apk + path: mobile/android/app/build/outputs/apk/debug/app-debug.apk + - name: 'Create Pre-release' id: create_release if: inputs.semver == '' # only if this workflow is not called from a push to tag (a Release) @@ -64,12 +85,12 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: android-${{ steps.commit.outputs.short }} - release_name: robosats-alpha-${{ steps.commit.outputs.short }} + release_name: robosats-android-${{ steps.commit.outputs.short }} draft: false prerelease: true - - name: 'Upload Pre-release APK Asset' - id: upload-release-asset + - name: 'Upload Pre-release APK Release Asset' + id: upload-release-apk-asset if: inputs.semver == '' # only if this workflow is not called from a push to tag (a Release) uses: actions/upload-release-asset@v1 env: @@ -79,3 +100,15 @@ jobs: asset_path: ./mobile/android/app/build/outputs/apk/release/app-release.apk asset_name: robosats-${{ steps.commit.outputs.short }}.apk asset_content_type: application/apk + + - name: 'Upload Pre-release APK Debug Asset' + id: upload-debug-apk-asset + if: inputs.semver == '' # only if this workflow is not called from a push to tag (a Release) + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./mobile/android/app/build/outputs/apk/debug/app-debug.apk + asset_name: robosats-debug-${{ steps.commit.outputs.short }}.apk + asset_content_type: application/apk diff --git a/.github/workflows/client-image.yml b/.github/workflows/client-image.yml index 8628eac7..0847d79b 100644 --- a/.github/workflows/client-image.yml +++ b/.github/workflows/client-image.yml @@ -31,7 +31,7 @@ jobs: with: workflow: frontend-build.yml workflow_conclusion: success - name: main-js + name: web-main-js path: nodeapp/static/frontend/ - name: 'Log in to Docker Hub' diff --git a/.github/workflows/coordinator-image.yml b/.github/workflows/coordinator-image.yml index 1c5a7472..74b4c304 100644 --- a/.github/workflows/coordinator-image.yml +++ b/.github/workflows/coordinator-image.yml @@ -20,7 +20,7 @@ jobs: with: workflow: frontend-build.yml workflow_conclusion: success - name: main-js + name: web-main-js path: frontend/static/frontend/ - name: 'Log in to Docker Hub' diff --git a/.github/workflows/frontend-build.yml b/.github/workflows/frontend-build.yml index 43592a52..c3e45a8c 100644 --- a/.github/workflows/frontend-build.yml +++ b/.github/workflows/frontend-build.yml @@ -51,8 +51,13 @@ jobs: - name: 'Archive Built Results' uses: actions/upload-artifact@v3 with: - name: main-js + name: web-main-js path: frontend/static/frontend/main.js + - name: 'Archive Built Results' + uses: actions/upload-artifact@v3 + with: + name: mobile-main-js + path: mobile/html/Web.bundle/js/main.js # Invoke pre-release image build if this was not a tag push # Docker images tagged only with short commit hash diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7b20699a..b63cb0af 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -55,12 +55,11 @@ jobs: needs: frontend-build secrets: inherit - # Disabled until first Android APK release - # android-build: - # uses: reckless-satoshi/robosats/.github/workflows/coordinator-image.yml@main - # needs: frontend-build - # with: - # semver: ${{ needs.check-versions.outputs.semver }} + android-build: + uses: reckless-satoshi/robosats/.github/workflows/coordinator-image.yml@main + needs: frontend-build + with: + semver: ${{ needs.check-versions.outputs.semver }} release: needs: [check-versions, coordinator-image, client-image] #, android-build] @@ -79,21 +78,21 @@ jobs: with: body: ${{ steps.changelog.outputs.changelog }} - # Disabled until first Android APK release - # - name: 'Download APK Artifact' - # uses: dawidd6/action-download-artifact@v2 - # with: - # workflow: android-build.yml - # workflow_conclusion: success - # name: robosats-${{ needs.check-versions.outputs.semver }}.apk - # path: . - # - name: 'Upload APK Asset' - # id: upload-release-asset - # uses: actions/upload-release-asset@v1 - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # with: - # upload_url: ${{ steps.create-release.outputs.upload_url }} - # asset_path: app-release.apk - # asset_name: robosats-${{ needs.check-versions.outputs.semver }}.apk - # asset_content_type: application/apk \ No newline at end of file + # Upload APK artifact + - name: 'Download APK Artifact' + uses: dawidd6/action-download-artifact@v2 + with: + workflow: android-build.yml + workflow_conclusion: success + name: robosats-${{ needs.check-versions.outputs.semver }}.apk + path: . + - name: 'Upload APK Asset' + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create-release.outputs.upload_url }} + asset_path: app-release.apk + asset_name: robosats-${{ needs.check-versions.outputs.semver }}.apk + asset_content_type: application/apk \ No newline at end of file diff --git a/mobile/CHANGELOG.md b/mobile/CHANGELOG.md index d220c71e..5cea7687 100644 --- a/mobile/CHANGELOG.md +++ b/mobile/CHANGELOG.md @@ -1,5 +1,5 @@ # Android Pre-release -To be prepared for Android releases. +Android pre-release for testing. This pre-releases has @KoalaSats #247 torified requests through webview. While the app is not fully functioional (no cookies, therefore no permanent robot and no authenticated requests are possible), it would be great to start testing Tor requests in different systems. -App should not be used as of now. It uses the clearnet unsafe tor2web bridge. +This releases has two assets. A release-like APK and a debug APK (it will show logs for errors). diff --git a/mobile/android/app/build.gradle b/mobile/android/app/build.gradle index 5acf7cde..c5a12e74 100644 --- a/mobile/android/app/build.gradle +++ b/mobile/android/app/build.gradle @@ -137,6 +137,13 @@ android { main { assets.srcDirs = ['src/main/assets', '../../html'] } } + packagingOptions { + pickFirst 'lib/armeabi-v7a/libruntimeexecutor.so' + pickFirst 'lib/arm64-v8a/libruntimeexecutor.so' + pickFirst 'lib/x86_64/libruntimeexecutor.so' + pickFirst 'lib/x86/libruntimeexecutor.so' + } + defaultConfig { applicationId "com.robosats" minSdkVersion rootProject.ext.minSdkVersion diff --git a/mobile/android/build.gradle b/mobile/android/build.gradle index f45e9cf6..b5841333 100644 --- a/mobile/android/build.gradle +++ b/mobile/android/build.gradle @@ -8,6 +8,7 @@ buildscript { minSdkVersion = 26 compileSdkVersion = 31 targetSdkVersion = 31 + kotlin_version = "1.7.10" if (System.properties['os.arch'] == "aarch64") { // For M1 Users we need to use the NDK 24 which added support for aarch64 @@ -22,7 +23,7 @@ buildscript { mavenCentral() } dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.0" + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10" classpath("com.android.tools.build:gradle:7.1.1") classpath("com.facebook.react:react-native-gradle-plugin") classpath("de.undercouch:gradle-download-task:5.0.1")