Skip to content

Commit

Permalink
ci: adding ci support
Browse files Browse the repository at this point in the history
adding ci support
  • Loading branch information
arunavabasucom authored May 22, 2023
2 parents fcdcd34 + 4bda3cf commit 43f680e
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 14 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/ci-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: ci-prod
on:
push:
branches:
- main
jobs:
build-apk:
name: build-apk
runs-on: ubuntu-latest
steps:
- name: Setup repo
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: yarn

- name: Setup EAS
uses: expo/expo-github-action@v8
with:
eas-cache: true
expo-cache: true
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}

- name: Install dependencies
run: yarn install

- name: Build apk
run: eas build --platform android --non-interactive --profile development
build-aab:
name: build-aab
runs-on: ubuntu-latest
needs: build-apk
steps:
- name: Setup repo
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: yarn

- name: Setup EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}

- name: Install dependencies
run: yarn install

- name: Build app
run: eas build --non-interactive

39 changes: 39 additions & 0 deletions .github/workflows/ci-pull.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: ci-preview
on: pull_request

jobs:
perview:
name: perview
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Check for EXPO_TOKEN
run: |
if [ -z "${{ secrets.EXPO_TOKEN }}" ]; then
echo "You must provide an EXPO_TOKEN secret"
exit 1
fi
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: yarn

- name: Setup EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}

- name: Install dependencies
run: yarn install

- name: Create preview
uses: expo/expo-github-action/preview@v8
with:
command: eas update --auto

1 change: 1 addition & 0 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"expo": {
"name": "deliveroo-clone",
"slug": "deliveroo-clone",
"owner": "arunavabasu-03",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
Expand Down
Binary file modified assets/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 4 additions & 14 deletions eas.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,13 @@
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal",
"ios": {
"resourceClass": "m-medium"
"android": {
"buildType": "apk"
}

},
"preview": {
"distribution": "internal",
"ios": {
"resourceClass": "m-medium"
}
},
"production": {
"ios": {
"resourceClass": "m-medium"
}
}
"production": {}
},
"submit": {
"production": {}
Expand Down

0 comments on commit 43f680e

Please sign in to comment.