From 45dfbd4de46bd882fdadb0c50b14d97f6e3af3cf Mon Sep 17 00:00:00 2001 From: AYAN Date: Tue, 17 Nov 2020 13:51:13 +0530 Subject: [PATCH] deploy script changed --- .github/workflows/android-deploy.yml | 46 ---------------------------- .github/workflows/deploy.yml | 37 ++++++++++++++++++++++ 2 files changed, 37 insertions(+), 46 deletions(-) delete mode 100644 .github/workflows/android-deploy.yml create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/android-deploy.yml b/.github/workflows/android-deploy.yml deleted file mode 100644 index b2ae85e..0000000 --- a/.github/workflows/android-deploy.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: react-native-android-build-apk -on: - push: - branches: - - main -jobs: - build-android-bundle: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: Install npm modules - run: npm install - - name: run Jetify - run: yarn jetify - - name: Build Android Bundle Release - run: | - ./gradlew bundleRelease - working-directory: android - - - name: Upload Artifact - uses: actions/upload-artifact@master - with: - name: app-release.aab - path: android/app/build/outputs/bundle/release/ - - - name: Display structure of downloaded files - run: ls -R - working-directory: android/app/build/outputs/bundle/release/ - - - name: Build Universal APK - uses: skywall/universal-apk-builder@v1.0.0 - with: - aab_path: "android/app/build/outputs/bundle/release/app-release.aab" - output_dir: "android/app/build/outputs/apk/release" - keystore_path: "android/app/my-key.keystore" - keystore_password: ${{secrets.KEYSTORE_PASSWORD}} - keystore_alias: ${{secrets.KEYSTORE_ALIAS}} - keystore_alias_password: ${{secrets.KEYSTORE_PASSWORD}} - - - name: upload artifact to Firebase App Distribution - uses: wzieba/Firebase-Distribution-Github-Action@v1.2.1 - with: - appId: ${{ secrets.FIREBASE_APP_ID }} - token: ${{ secrets.FIREBASE_TOKEN }} - groups: beta-testers - file: android/app/build/outputs/apk/release/universal.apk \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..1701a84 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,37 @@ +name: react-native-android-build-apk +on: + push: + branches: + - main +jobs: + install-and-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install npm dependencies + run: | + npm install + build-android: + needs: install-and-test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - 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: upload artifact to Firebase App Distribution + uses: wzieba/Firebase-Distribution-Github-Action@v1.2.1 + with: + appId: ${{ secrets.FIREBASE_APP_ID }} + token: ${{ secrets.FIREBASE_TOKEN }} + groups: beta-testers + file: android/app/build/outputs/apk/release/app-release.apk \ No newline at end of file