eas init #5
This file contains hidden or 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 and Release APK | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # Required to create a release | |
| steps: | |
| - name: π Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: π Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: π Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 # Or your specific version | |
| run_install: false | |
| - name: π Setup EAS | |
| uses: expo/expo-github-action@v8 | |
| with: | |
| eas-version: latest | |
| token: ${{ secrets.EXPO_TOKEN }} | |
| - name: π¦ Install dependencies | |
| run: pnpm install | |
| - name: π Build APK | |
| id: build_apk | |
| run: | | |
| # Ensure repo-level node_modules bin is on PATH | |
| export PATH="$GITHUB_WORKSPACE/node_modules/.bin:$PATH" | |
| # The --output flag tells EAS to download the finished APK to a specific file path | |
| eas build --platform android --profile production --non-interactive --local --output=./app-release.apk | |
| - name: π’ Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: v${{ github.run_number }} | |
| name: Release v${{ github.run_number }} | |
| files: app-release.apk | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |