Update README.md #395
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 🛠️ Build Android | |
on: | |
push: | |
branches: [ main, develop ] | |
pull_request: | |
branches: [ main, develop ] | |
jobs: | |
start: | |
name: 🚀 Initial Setup | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: 🏁 Starting Job | |
run: | | |
echo "Beginning to build ${{ github.repository }}" | |
build: | |
name: 🏗️ Build | |
needs: start | |
runs-on: ubuntu-latest | |
steps: | |
- name: 📥 Checkout "${{ github.repository }}" | |
uses: actions/checkout@v4 | |
- name: 📝 Create frontend env file | |
run: | | |
touch frontend/.env | |
echo "${{ secrets.FRONTEND_ENV_FILE }}" > frontend/.env | |
shell: bash | |
- name: 🧰 Set up Node (stable) | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18.18.x | |
# # Step 3: Install Expo CLI | |
# - name: 📦 Install Expo CLI | |
# run: cd frontend && npm install -g expo-cli && npm install -g sharp-cli@^2.1.0 | |
- name: 🏗️ Setup EAS | |
uses: expo/expo-github-action@v8 | |
with: | |
expo-version: latest | |
eas-version: latest | |
token: ${{ secrets.EXPO_TOKEN }} | |
- name: 📦 Install NPM dependencies | |
run: | | |
cd frontend && npm ci | |
- name: 📤 Upload app secrets to EAS | |
run: | | |
cd frontend && eas secret:push --scope project --env-file .env --force | |
# Step 4: Install dependencies | |
# - name: 📦 Install Yarn dependencies | |
# run: cd frontend && yarn install | |
- name: 📦 Install Potential Peer Dependencies | |
run: cd frontend && npx expo install react-native-reanimated @types/node @types/yargs-parser @babel/core @types/babel__generator @types/babel__template @types/babel__traverse @types/istanbul-lib-coverage @types/istanbul-lib-report @types/tough-cookie @types/prop-types react-datepicker @types/react @types/yargs-parser eslint eslint-plugin-import eslint-config-prettier expo expo-constants expo-linking expo-status-bar react-native-safe-area-context react-native-screens jest-resolve | |
- name: 📦 Fix Anything that may need fixing | |
run: cd frontend && npx expo install --fix | |
- name: 🧰 Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
# Step 5: Build APK with Expo CLI | |
- name: 📱 Build APK | |
run: cd frontend && eas build --platform android --profile preview --local --wait --non-interactive --output ${{ github.workspace }}/app-release.apk | |
- name: 📤 Upload APK artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: app-release | |
path: ${{ github.workspace }}/app-release.apk | |
end: | |
name: 🏁 The end | |
runs-on: ubuntu-latest | |
needs: [start, build] | |
steps: | |
- name: 🏁 Ending | |
id: init | |
run: | | |
echo "${{ github.repository }} has been built successfully" |