Skip to content

Commit

Permalink
⚒️ GH Action Release: Back to old codes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arafat-alim committed Oct 30, 2024
1 parent 26949e1 commit bb957a5
Showing 1 changed file with 11 additions and 22 deletions.
33 changes: 11 additions & 22 deletions .github/workflows/gh-actions-expo-build-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,43 @@ name: Android App APK Build
on:
push:
branches:
- staging

- new-features
jobs:
build:
runs-on: ubuntu-latest
steps:
# Step 1: Check out the repository code
- name: Checkout repository
- name: Setup repo
uses: actions/checkout@v4

# Step 2: Set up Node.js environment with caching for faster installs
- name: Setup Node.js
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 20.x
cache: "npm"

# Step 3: Set up JDK 17 for Android build compatibility
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "temurin"

# Step 4: Install the Android SDK
- name: Setup Android SDK
uses: android-actions/setup-android@v3

# Step 5: Install Expo CLI and EAS CLI
- name: Install Expo CLI and EAS CLI
run: npm install -g expo-cli eas-cli
- name: Setup Expo
uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}

# Step 6: Install project dependencies with Yarn
- name: Install dependencies
run: yarn install --frozen-lockfile

# Step 7: Build the Android APK using EAS with EXPO_TOKEN for authentication
- name: Build Android app
env:
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
run: |
eas build --platform android --profile preview --local --output ${{ github.workspace }}/app-release.apk
continue-on-error: false # Ensures the job fails on build error

# Step 8: Upload the generated APK file as an artifact for download
run: eas build --platform android --profile preview --local --output ${{ github.workspace }}/app-release.apk
- name: Upload APK artifact
if: success() # Run only if the build step succeeded
uses: actions/upload-artifact@v4 # Updated to v4 to avoid deprecation
uses: actions/upload-artifact@v4
with:
name: app-release
path: ${{ github.workspace }}/app-release.apk

0 comments on commit bb957a5

Please sign in to comment.