From 02ef4bfc89e66fdf6593dd744aef53adee57b861 Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Sun, 5 May 2024 15:57:38 +0100 Subject: [PATCH] build: Add iOS and android builds to github actions --- .github/workflows/android.yml | 41 +++++++++++++++++++++++++++++++++++ .github/workflows/ios.yml | 32 +++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 .github/workflows/android.yml create mode 100644 .github/workflows/ios.yml diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml new file mode 100644 index 00000000..3528d73c --- /dev/null +++ b/.github/workflows/android.yml @@ -0,0 +1,41 @@ +name: Android App Release Build + +on: + push: + tags: + - 'android/v[0-9]+.[0-9]+.[0-9]+' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Setup repo + uses: actions/checkout@v4 + + - name: Setup + uses: ./tooling/github/setup + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + - name: Setup Android SDK + uses: android-actions/setup-android@v3 + + - name: Setup Expo + uses: expo/expo-github-action@v8 + with: + expo-version: latest + eas-version: latest + token: ${{ secrets.EXPO_TOKEN }} + + - name: Build Android app + run: eas build --platform android --local --output ${{ github.workspace }}/app-release.aab + + - name: Upload AAB artifact + uses: actions/upload-artifact@v4 + with: + name: hoarder-android + path: ${{ github.workspace }}/app-release.aab diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml new file mode 100644 index 00000000..459c03cc --- /dev/null +++ b/.github/workflows/ios.yml @@ -0,0 +1,32 @@ +name: iOS App Release Build + +on: + push: + tags: + - 'ios/v[0-9]+.[0-9]+.[0-9]+' + +jobs: + build: + runs-on: macos-latest + steps: + - name: Setup repo + uses: actions/checkout@v4 + + - name: Setup + uses: ./tooling/github/setup + + - name: Setup Expo + uses: expo/expo-github-action@v8 + with: + expo-version: latest + eas-version: latest + token: ${{ secrets.EXPO_TOKEN }} + + - name: Build iOS app + run: eas build --platform ios --local --non-interactive --output ${{ github.workspace }}/app-release.ipa + + - name: Upload IPA artifact + uses: actions/upload-artifact@v4 + with: + name: hoarder-ios + path: ${{ github.workspace }}/app-release.ipa