WIP Added android build workflow #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v4 | |
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 |