Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/expo-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,38 @@ jobs:
run: pnpm install --frozen-lockfile
- name: TypeScript type check
run: npx tsc --noEmit

build:
runs-on: ubuntu-latest
needs: [lint, format, typecheck]
env:
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 10.12.1
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Ensure EAS CLI available
run: pnpm dlx eas-cli@latest --version
# No explicit login needed, Expo CLI uses EXPO_TOKEN env automatically
- name: Build Android APK
if: env.EXPO_TOKEN != ''
run: pnpm dlx eas-cli@latest build --platform android --non-interactive --profile preview --clear-cache --wait
- name: Download Android APK
if: env.EXPO_TOKEN != ''
run: pnpm dlx eas-cli@latest build:download --platform android --profile preview --latest --path ./app.apk
Comment on lines +92 to +99
Copy link

Copilot AI Aug 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The EAS CLI version is not pinned, using '@latest' which could lead to unexpected behavior if breaking changes are introduced. Consider pinning to a specific version for reproducible builds.

Suggested change
run: pnpm dlx eas-cli@latest --version
# No explicit login needed, Expo CLI uses EXPO_TOKEN env automatically
- name: Build Android APK
if: env.EXPO_TOKEN != ''
run: pnpm dlx eas-cli@latest build --platform android --non-interactive --profile preview --clear-cache --wait
- name: Download Android APK
if: env.EXPO_TOKEN != ''
run: pnpm dlx eas-cli@latest build:download --platform android --profile preview --latest --path ./app.apk
run: pnpm dlx eas-cli@6.3.0 --version
# No explicit login needed, Expo CLI uses EXPO_TOKEN env automatically
- name: Build Android APK
if: env.EXPO_TOKEN != ''
run: pnpm dlx eas-cli@6.3.0 build --platform android --non-interactive --profile preview --clear-cache --wait
- name: Download Android APK
if: env.EXPO_TOKEN != ''
run: pnpm dlx eas-cli@6.3.0 build:download --platform android --profile preview --latest --path ./app.apk

Copilot uses AI. Check for mistakes.
Comment on lines +92 to +99
Copy link

Copilot AI Aug 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The EAS CLI version is not pinned, using '@latest' which could lead to unexpected behavior if breaking changes are introduced. Consider pinning to a specific version for reproducible builds.

Suggested change
run: pnpm dlx eas-cli@latest --version
# No explicit login needed, Expo CLI uses EXPO_TOKEN env automatically
- name: Build Android APK
if: env.EXPO_TOKEN != ''
run: pnpm dlx eas-cli@latest build --platform android --non-interactive --profile preview --clear-cache --wait
- name: Download Android APK
if: env.EXPO_TOKEN != ''
run: pnpm dlx eas-cli@latest build:download --platform android --profile preview --latest --path ./app.apk
run: pnpm dlx eas-cli@6.3.0 --version
# No explicit login needed, Expo CLI uses EXPO_TOKEN env automatically
- name: Build Android APK
if: env.EXPO_TOKEN != ''
run: pnpm dlx eas-cli@6.3.0 build --platform android --non-interactive --profile preview --clear-cache --wait
- name: Download Android APK
if: env.EXPO_TOKEN != ''
run: pnpm dlx eas-cli@6.3.0 build:download --platform android --profile preview --latest --path ./app.apk

Copilot uses AI. Check for mistakes.
# ...existing code...
- name: Upload Android artifact
if: env.EXPO_TOKEN != ''
Comment on lines +95 to +102
Copy link

Copilot AI Aug 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition 'env.EXPO_TOKEN != ''' is repeated three times. Consider using a job-level condition or extracting this to a reusable condition to reduce duplication.

Suggested change
if: env.EXPO_TOKEN != ''
run: pnpm dlx eas-cli@latest build --platform android --non-interactive --profile preview --clear-cache --wait
- name: Download Android APK
if: env.EXPO_TOKEN != ''
run: pnpm dlx eas-cli@latest build:download --platform android --profile preview --latest --path ./app.apk
# ...existing code...
- name: Upload Android artifact
if: env.EXPO_TOKEN != ''
run: pnpm dlx eas-cli@latest build --platform android --non-interactive --profile preview --clear-cache --wait
- name: Download Android APK
run: pnpm dlx eas-cli@latest build:download --platform android --profile preview --latest --path ./app.apk
# ...existing code...
- name: Upload Android artifact

Copilot uses AI. Check for mistakes.
Comment on lines +95 to +102
Copy link

Copilot AI Aug 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition 'env.EXPO_TOKEN != ''' is repeated three times. Consider using a job-level condition or extracting this to a reusable condition to reduce duplication.

Suggested change
if: env.EXPO_TOKEN != ''
run: pnpm dlx eas-cli@latest build --platform android --non-interactive --profile preview --clear-cache --wait
- name: Download Android APK
if: env.EXPO_TOKEN != ''
run: pnpm dlx eas-cli@latest build:download --platform android --profile preview --latest --path ./app.apk
# ...existing code...
- name: Upload Android artifact
if: env.EXPO_TOKEN != ''
if: env.HAS_EXPO_TOKEN == 'true'
run: pnpm dlx eas-cli@latest build --platform android --non-interactive --profile preview --clear-cache --wait
- name: Download Android APK
if: env.HAS_EXPO_TOKEN == 'true'
run: pnpm dlx eas-cli@latest build:download --platform android --profile preview --latest --path ./app.apk
# ...existing code...
- name: Upload Android artifact
if: env.HAS_EXPO_TOKEN == 'true'

Copilot uses AI. Check for mistakes.
Comment on lines +95 to +102
Copy link

Copilot AI Aug 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition 'env.EXPO_TOKEN != ''' is repeated three times. Consider using a job-level condition or extracting this to a reusable condition to reduce duplication.

Suggested change
if: env.EXPO_TOKEN != ''
run: pnpm dlx eas-cli@latest build --platform android --non-interactive --profile preview --clear-cache --wait
- name: Download Android APK
if: env.EXPO_TOKEN != ''
run: pnpm dlx eas-cli@latest build:download --platform android --profile preview --latest --path ./app.apk
# ...existing code...
- name: Upload Android artifact
if: env.EXPO_TOKEN != ''
run: pnpm dlx eas-cli@latest build --platform android --non-interactive --profile preview --clear-cache --wait
- name: Download Android APK
run: pnpm dlx eas-cli@latest build:download --platform android --profile preview --latest --path ./app.apk
# ...existing code...
- name: Upload Android artifact

Copilot uses AI. Check for mistakes.
uses: actions/upload-artifact@v4
with:
name: android-apk
path: ./app.apk
Loading