From 61b614812875d958d14904662fc97ca77d592aa8 Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi Date: Thu, 14 Jul 2022 10:27:14 -0700 Subject: [PATCH] Add android build workflow --- .github/workflows/android-build.yml | 44 +++++++++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 46 insertions(+) create mode 100644 .github/workflows/android-build.yml diff --git a/.github/workflows/android-build.yml b/.github/workflows/android-build.yml new file mode 100644 index 00000000..6af0ead5 --- /dev/null +++ b/.github/workflows/android-build.yml @@ -0,0 +1,44 @@ +name: Android Build +on: + workflow_dispatch: + push: + branches: [ "main" , "android-webview-app-ts"] + paths: [ "mobile", "frontend" ] + pull_request: + branches: [ "main" , "android-webview-app-ts"] + paths: [ "mobile", "frontend" ] + +jobs: + build-android: + runs-on: ubuntu-latest + steps: + - name: 'Checkout' + uses: actions/checkout@v3 + + - name: 'Download main.js Artifact' + uses: dawidd6/action-download-artifact@v2 + with: + workflow: frontend-build.yml + workflow_conclusion: success + name: main-js + path: mobile/html/Web.bundle/js/ + + - name: 'Install npm Dependencies' + run: | + cd mobile + npm install + + - name: 'Build Android Release' + run: | + cd mobile/android + ./gradlew assembleRelease + + - name: 'Get Commit Hash' + id: commit + uses: pr-mpt/actions-commit-hash@v1 + + - name: 'Upload .apk Artifact' + uses: actions/upload-artifact@v3 + with: + name: robosats-${{ steps.commit.outputs.short }}.apk + path: mobile/android/app/build/outputs/apk/release/app-release.apk \ No newline at end of file diff --git a/README.md b/README.md index 6ae99408..07a0d04e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ ## RoboSats - Buy and sell Satoshis Privately +[![Docker Image CI](https://github.com/Reckless-Satoshi/robosats/actions/workflows/docker-image.yml/badge.svg?branch=main)](https://github.com/Reckless-Satoshi/robosats/actions/workflows/docker-image.yml) +[![Frontend Build](https://github.com/Reckless-Satoshi/robosats/actions/workflows/frontend-build.yml/badge.svg?branch=main)](https://github.com/Reckless-Satoshi/robosats/actions/workflows/frontend-build.yml) [![release](https://img.shields.io/badge/release-v0.1.0%20MVP-red)](https://github.com/Reckless-Satoshi/robosats/releases) [![AGPL-3.0 license](https://img.shields.io/badge/license-AGPL--3.0-blue)](https://github.com/Reckless-Satoshi/robosats/blob/main/LICENSE) [![Telegram](https://img.shields.io/badge/chat-telegram-brightgreen)](https://t.me/robosats)