-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e84846
commit 575e59f
Showing
3 changed files
with
115 additions
and
56 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: EAS Build | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build: | ||
name: Install and build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- uses: expo/expo-github-action@v4 | ||
with: | ||
eas-version: latest | ||
token: ${{ secrets.EXPO_TOKEN }} | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Build Android APK | ||
run: eas build -p android --profile preview --non-interactive |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,58 @@ | ||
name: "Build Android app and EAS Update" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-and-update: | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Install EAS CLI | ||
run: npm install -g eas-cli | ||
|
||
- name: Setup Keystore | ||
run: | | ||
echo ${{ secrets.ANDROID_KEYSTORE_BASE64 }} | base64 --decode > android/app/upload-keystore.jks | ||
- name: Build APK | ||
env: | ||
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }} | ||
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} | ||
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }} | ||
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }} | ||
run: | | ||
eas build --platform android --profile production --wait | ||
- name: Download APK | ||
run: | | ||
BUILD_URL=$(eas build:list --json --limit=1 --platform=android --status=finished | jq -r '.[0].artifacts.buildUrl') | ||
curl -o app-production.apk $BUILD_URL | ||
- name: Upload APK artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: app | ||
path: app-production.apk | ||
retention-days: 3 | ||
|
||
- name: EAS Update | ||
env: | ||
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }} | ||
run: | | ||
eas update --auto | ||
# name: "Build Android app and EAS Update" | ||
|
||
# on: | ||
# push: | ||
# branches: | ||
# - main | ||
# pull_request: | ||
# types: [closed] | ||
|
||
# jobs: | ||
# build-and-update: | ||
# runs-on: macos-latest | ||
# steps: | ||
# - name: Checkout repository | ||
# uses: actions/checkout@v4 | ||
|
||
# - name: Install Java | ||
# uses: actions/setup-java@v4 | ||
# with: | ||
# java-version: '17' | ||
# distribution: 'adopt' | ||
# cache: 'gradle' | ||
|
||
# - name: Validate Gradle wrapper | ||
# uses: gradle/wrapper-validation-action@v2 | ||
|
||
# - name: Setup Node | ||
# uses: actions/setup-node@v4 | ||
# with: | ||
# node-version: '20' | ||
# cache: 'npm' | ||
|
||
# - name: Install dependencies | ||
# run: npm ci | ||
|
||
# - name: Install EAS CLI | ||
# run: npm install -g eas-cli | ||
|
||
# - name: Build APK (on merge) | ||
# if: github.event_name == 'pull_request' && github.event.pull_request.merged == true | ||
# run: | | ||
# cd android | ||
# ./gradlew assembleRelease | ||
|
||
# - name: Upload APK artifact (on merge) | ||
# if: github.event_name == 'pull_request' && github.event.pull_request.merged == true | ||
# uses: actions/upload-artifact@v4 | ||
# with: | ||
# name: app | ||
# path: android/app/build/outputs/apk/release/app-release.apk | ||
# retention-days: 3 | ||
|
||
# - name: EAS Update (on push) | ||
# if: github.event_name == 'push' | ||
# env: | ||
# EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }} | ||
# run: | | ||
# eas update --auto |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# name: update | ||
# on: push | ||
|
||
# jobs: | ||
# update: | ||
# name: EAS Update | ||
# runs-on: macos-latest | ||
# 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: Checkout repository | ||
# uses: actions/checkout@v4 | ||
|
||
# - name: Setup Node | ||
# uses: actions/setup-node@v4 | ||
# with: | ||
# node-version: 20 | ||
# cache: npm | ||
|
||
# - name: Setup EAS | ||
# uses: expo/expo-github-action@v8 | ||
# with: | ||
# eas-version: latest | ||
# token: ${{ secrets.EXPO_TOKEN }} | ||
|
||
# - name: Install dependencies | ||
# run: npm install | ||
|
||
# - name: Publish update | ||
# run: eas update --auto |