From f75efbeb00a3f01d4184ef0f0737e2ae21330d27 Mon Sep 17 00:00:00 2001 From: Amitoj Singh Date: Thu, 10 Oct 2024 16:54:00 -0600 Subject: [PATCH 1/8] 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 From 2e32b4a2aec1ad1adb7a3d8d0152e03a84ba424d Mon Sep 17 00:00:00 2001 From: Amitoj Singh Date: Thu, 10 Oct 2024 16:56:10 -0600 Subject: [PATCH 2/8] modified --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5605413..bfa5c07 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: run: | cd android && ./gradlew assembleRelease - name: Upload Artifact - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: name: app-release.apk path: android/app/build/outputs/apk/release/ From 586f91ff152565cdd76cad7d754ec8589246892d Mon Sep 17 00:00:00 2001 From: Amitoj Singh Date: Thu, 10 Oct 2024 17:38:23 -0600 Subject: [PATCH 3/8] added bundleSize --- .github/workflows/bundleSize.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/bundleSize.yml diff --git a/.github/workflows/bundleSize.yml b/.github/workflows/bundleSize.yml new file mode 100644 index 0000000..3819ced --- /dev/null +++ b/.github/workflows/bundleSize.yml @@ -0,0 +1,15 @@ +name: "react-native-bundle-size" +on: [pull-request] + +jobs: + test_something: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: shwetsolanki/react-native-bundle-size@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + ios-entry-file: "index.js" + android-entry-file: "index.js" + include-assets: "true" + include-source-maps: "true" From 8768162f1fb61971f97d44481f4e25dc9d4872b0 Mon Sep 17 00:00:00 2001 From: Amitoj Singh Date: Thu, 10 Oct 2024 17:40:30 -0600 Subject: [PATCH 4/8] updated --- .github/workflows/bundleSize.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/bundleSize.yml b/.github/workflows/bundleSize.yml index 3819ced..f1a1180 100644 --- a/.github/workflows/bundleSize.yml +++ b/.github/workflows/bundleSize.yml @@ -1,5 +1,8 @@ name: "react-native-bundle-size" -on: [pull-request] +on: + pull_request: + branches: + - dev jobs: test_something: From 727bd943286b12be36d24268dc86ae22adaa9ac7 Mon Sep 17 00:00:00 2001 From: Amitoj Singh Date: Thu, 10 Oct 2024 17:43:38 -0600 Subject: [PATCH 5/8] fix: bundle size --- .github/workflows/bundleSize.yml | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/.github/workflows/bundleSize.yml b/.github/workflows/bundleSize.yml index f1a1180..17e381e 100644 --- a/.github/workflows/bundleSize.yml +++ b/.github/workflows/bundleSize.yml @@ -1,18 +1,2 @@ -name: "react-native-bundle-size" -on: - pull_request: - branches: - - dev - -jobs: - test_something: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: shwetsolanki/react-native-bundle-size@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - ios-entry-file: "index.js" - android-entry-file: "index.js" - include-assets: "true" - include-source-maps: "true" +- name: react-native-bundle-size + uses: shwetsolanki/react-native-bundle-size@v1 From df7bfebd58659e1820bd7fb5c23ad5b4ea326bd7 Mon Sep 17 00:00:00 2001 From: Amitoj Singh Date: Thu, 10 Oct 2024 17:46:20 -0600 Subject: [PATCH 6/8] fix: react-native-bundle size --- .github/workflows/build.yml | 2 ++ .github/workflows/bundleSize.yml | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 .github/workflows/bundleSize.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bfa5c07..4a83904 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,3 +34,5 @@ jobs: 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 + - name: react-native-bundle-size + uses: shwetsolanki/react-native-bundle-size@v1 diff --git a/.github/workflows/bundleSize.yml b/.github/workflows/bundleSize.yml deleted file mode 100644 index 17e381e..0000000 --- a/.github/workflows/bundleSize.yml +++ /dev/null @@ -1,2 +0,0 @@ -- name: react-native-bundle-size - uses: shwetsolanki/react-native-bundle-size@v1 From 7a26d936c6ce3a49d4b553cf35e85a293ed273f7 Mon Sep 17 00:00:00 2001 From: Amitoj Singh Date: Thu, 10 Oct 2024 18:03:50 -0600 Subject: [PATCH 7/8] bundle size --- .github/workflows/build.yml | 64 +++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4a83904..ef62024 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,35 +4,43 @@ on: branches: - dev jobs: - install-and-test: + # install-and-test: + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v3 + # - name: Setup Node.js environment + # uses: actions/setup-node@v3 + # with: + # node-version: "20.x" + # - 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 + + bundle-size: 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 - name: react-native-bundle-size uses: shwetsolanki/react-native-bundle-size@v1 From 05e407e358f1236a06eae9b753f5e2dac595a6ba Mon Sep 17 00:00:00 2001 From: Amitoj Singh Date: Thu, 10 Oct 2024 18:15:08 -0600 Subject: [PATCH 8/8] github --- .github/workflows/build.yml | 70 +++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 38 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ef62024..ae43b35 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,43 +4,37 @@ on: branches: - dev jobs: - # install-and-test: - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 - # - name: Setup Node.js environment - # uses: actions/setup-node@v3 - # with: - # node-version: "20.x" - # - 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 - - bundle-size: + install-and-test: runs-on: ubuntu-latest steps: - - name: react-native-bundle-size - uses: shwetsolanki/react-native-bundle-size@v1 + - uses: actions/checkout@v3 + - name: Setup Node.js environment + uses: actions/setup-node@v3 + with: + node-version: "20.x" + - 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/runs/${{github.run_id}})" + check_for_duplicate_msg: false