From a2fe9cf7dfa913de3ba592a2abee42e24867e3de Mon Sep 17 00:00:00 2001 From: Omkar Joshi <65808188+OmkarJ13@users.noreply.github.com> Date: Tue, 12 Dec 2023 12:57:53 +0530 Subject: [PATCH] feat: Generate staging build on push of release branches (#2626) * Minor * Testing * Minor * Revert "Minor" This reverts commit 92369dbc3852bddd0884fcace3d99cb935023d8c. * Minor * Minor --- .github/workflows/appflow-release-branch.yml | 81 ++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 .github/workflows/appflow-release-branch.yml diff --git a/.github/workflows/appflow-release-branch.yml b/.github/workflows/appflow-release-branch.yml new file mode 100644 index 0000000000..5c95e07b3f --- /dev/null +++ b/.github/workflows/appflow-release-branch.yml @@ -0,0 +1,81 @@ +name: Appflow Release Branch + +on: + push: + branches: + - 'mobile_release_.*' + +jobs: + build-app: + runs-on: ubuntu-latest + steps: + - name: Build Android with Appflow + uses: ionic-team/appflow-build@v1 + with: + token: ${{ secrets.APPFLOW_TOKEN }} + app-id: 32316914 + platform: Android + build-type: debug + environment: staging + native-config: staging + upload-artifact: Android + + - uses: actions/download-artifact@v2 + id: download + with: + name: 'Android' + path: ./ + + - name: Rename file + run: mv *.apk android.apk + + - name: Upload apk to Diawi + uses: rnkdsh/action-upload-diawi@v1.2.0 + id: diwaiAndroid + with: + token: ${{ secrets.DIAWI_TOKEN }} + file: android.apk + + - name: Build iOS on Appflow + uses: ionic-team/appflow-build@v1 + with: + token: ${{ secrets.APPFLOW_TOKEN }} + app-id: 32316914 + platform: iOS + build-type: development + certificate: Fyle signing + environment: staging + native-config: prod + upload-artifact: ios + + - uses: actions/download-artifact@v2 + id: ios + with: + name: 'ios' + path: ./ + + - name: Rename file + run: mv *.ipa ios.ipa + + - name: Upload ipa to diawi + uses: rnkdsh/action-upload-diawi@v1.2.0 + id: diwaiIos + with: + token: ${{ secrets.DIAWI_TOKEN }} + file: ios.ipa + + - name: Get branch name + id: get-branch + uses: xom9ikk/split@v1 + with: + string: ${{ github.ref }} + separator: refs/heads/ + + - name: Send Message to Slack + uses: archive/github-actions-slack@v2.0.1 + id: notify + with: + slack-bot-user-oauth-access-token: ${{ secrets.SLACK_BOT_USER_OAUTH_ACCESS_TOKEN }} + slack-channel: C029QPGHSQL + slack-text: ${{github.event.sender.login}} pushed to ${{github.ref_name}}. \r\n \r\n APK Link ${{steps.diwaiAndroid.outputs.url}} \r\n IPA link ${{steps.diwaiIos.outputs.url}} +