From f75efbeb00a3f01d4184ef0f0737e2ae21330d27 Mon Sep 17 00:00:00 2001 From: Amitoj Singh Date: Thu, 10 Oct 2024 16:54:00 -0600 Subject: [PATCH] feat: added android build --- .github/workflows/build.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..5605413 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,36 @@ +name: react-native-android-build-apk +on: + pull_request: + branches: + - dev +jobs: + install-and-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install npm dependencies + run: | + npm install + build-android: + needs: install-and-test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install npm dependencies + run: | + npm install + - name: Build Android Release + run: | + cd android && ./gradlew assembleRelease + - name: Upload Artifact + uses: actions/upload-artifact@v1 + with: + name: app-release.apk + path: android/app/build/outputs/apk/release/ + - name: Post Artifact Link in PR Comment + uses: unsplash/comment-on-pr@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + msg: "Android APK build is complete. You can download the release APK here: [Download APK](https://github.com/${{ github.repository }}/actions/artifacts)" + check_for_duplicate_msg: false