Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
74 changes: 74 additions & 0 deletions .github/workflows/eas-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: EAS Production Build

on:
push:
tags:
- 'v*'

permissions:
contents: write

jobs:
production-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm

- run: npm ci

- name: Install EAS CLI
run: npm install -g eas-cli

- name: Submit EAS Build
run: eas build --platform android --profile production --non-interactive --no-wait
env:
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}

- name: Wait for build to finish and download APK
run: |
BUILD_ID=""
for i in $(seq 1 60); do
BUILD_JSON=$(eas build:list --json --platform android --limit 1 2>/dev/null || echo "")
if [ -n "$BUILD_JSON" ] && [ "$BUILD_JSON" != "[]" ]; then
BUILD_ID=$(echo "$BUILD_JSON" | jq -r '.[0].id // empty')
STATUS=$(echo "$BUILD_JSON" | jq -r '.[0].status // empty')
echo "Build status: $STATUS (attempt $i/60)"
if [ "$STATUS" = "finished" ]; then
echo "Build finished!"
break
elif [ "$STATUS" = "errored" ] || [ "$STATUS" = "cancelled" ]; then
echo "::error::Build $STATUS"
exit 1
fi
fi
sleep 30
done

if [ -z "$BUILD_ID" ]; then
echo "::error::Build did not finish within the timeout period"
exit 1
fi

eas build:download "$BUILD_ID" --output app-release.apk
echo "artifact_path=app-release.apk" >> "$GITHUB_ENV"
env:
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}

- name: Create GitHub Release
run: |
gh release create "${{ github.ref_name }}" \
--title "Release ${{ github.ref_name }}" \
--generate-notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload APK to Release
run: |
gh release upload "${{ github.ref_name }}" app-release.apk --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,26 @@ npx expo start --web

---

## 🚢 Release Process

1. Ensure all changes are merged to `main`.
2. From `main`, run `npm version patch` (or `minor`/`major`) to bump the version and create a tag:
```bash
git checkout main
git pull
npm version patch # creates v0.x.x locally
git push --tags
```
3. Pushing a `v*` tag triggers the [EAS Production Build](.github/workflows/eas-build.yml) workflow:
- Builds the Android APK via EAS Build (`production` profile)
- Creates a GitHub Release with auto-generated release notes
- Attaches the APK as a downloadable release asset
4. Monitor the build at [Actions → EAS Production Build](https://github.com/StepFi-app/StepFi-App/actions/workflows/eas-build.yml).

> **Note:** The workflow requires the `EXPO_TOKEN` repository secret. Set it in **Settings → Secrets and variables → Actions → New repository secret** using a token from your [Expo access tokens settings](https://expo.dev/accounts/settings/access-tokens).

---

## 🤝 Contributing

We welcome React Native and Expo developers of all levels! See [CONTRIBUTING.md](./CONTRIBUTING.md) for setup, code style, and the PR process.
Expand Down
6 changes: 6 additions & 0 deletions context/progress-tracker.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ Build all shared components from scratch using StepFi's dark theme design system
- `app/(tabs)/_layout.tsx` — bottom Tabs (pay/invest/settings) with Lucide icons (`CreditCard`, `TrendingUp`, `Settings`), brand-green active tint
- `app/(tabs)/pay.tsx`, `app/(tabs)/invest.tsx`, `app/(tabs)/settings.tsx` — placeholders

### CI / CD
- `.github/workflows/eas-build.yml` — automated EAS production build triggered on `v*` tag push; builds Android APK, creates GitHub Release, attaches APK as asset
- `eas.json` — production profile configured with `android.buildType: apk`
- `README.md` — release process documented under 🚢 Release Process

### Verification
- `npx expo export --platform web` — succeeded (2394 modules bundled, exit 0)

Expand Down Expand Up @@ -92,6 +97,7 @@ Build all shared components from scratch using StepFi's dark theme design system
### Deployment
18. Expo preview build (EAS)
19. Netlify web build
20. EAS automated production build pipeline — GitHub Actions workflow triggered on `v*` tag push, builds APK via `eas build`, attaches to GitHub Release

---

Expand Down
5 changes: 4 additions & 1 deletion eas.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
"distribution": "internal"
},
"production": {
"autoIncrement": true
"autoIncrement": true,
"android": {
"buildType": "apk"
}
}
},
"submit": {
Expand Down