diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..04d1ce95 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,47 @@ +name: Build Android APK +on: + schedule: + - cron: '0 0 * * *' # Runs every day at 00:00 UTC + workflow_dispatch: # Allows you to run this manually from the "Actions" tab + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: '17' + + - name: Install Dependencies + run: npm install --legacy-peer-deps + + - name: Setup Expo + uses: expo/expo-github-action@v8 + with: + expo-version: latest + + - name: Prebuild Android + run: npx expo prebuild --platform android + + - name: Build APK (Release) + run: | + cd android + chmod +x gradlew + ./gradlew assembleRelease + + - name: Upload APK + uses: actions/upload-artifact@v4 + with: + name: nuvio-app-release + path: android/app/build/outputs/apk/release/app-release.apk