Update README.md #12
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: Android App APK Build | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- name: Check for EXPO_TOKEN | |
run: | | |
if [ -z "${{ secrets.EXPO_TOKEN }}" ]; then | |
echo "You must provide an EXPO_TOKEN secret linked to this project's Expo account in this repo's secrets. Learn more: https://docs.expo.dev/eas-update/github-actions" | |
exit 1 | |
fi | |
- name: 🏗 Setup repo | |
uses: actions/checkout@v4 | |
- name: 🏗 Set up Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: 🏗 Setup EAS | |
uses: expo/expo-github-action@v8 | |
with: | |
eas-version: latest | |
token: ${{ secrets.EXPO_TOKEN }} | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: "17" | |
distribution: "temurin" | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v3 | |
- name: 📦 Install dependencies | |
run: npm install | |
- name: 📦 Build Android app | |
run: eas build --platform android --profile preview --local --output ${{ github.workspace }}/app-release.apk | |
- name: 📦 Upload APK to GitHub Release | |
id: upload-release | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: Build | |
files: ${{ github.workspace }}/app-release.apk | |
generate_release_notes: true | |
draft: false | |
prerelease: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.SECRET_GITHUB_TOKEN }} | |
# - name: Upload APK artifact | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# name: app-release | |
# path: ${{ github.workspace }}/app-release.apk |