Skip to content

Commit 1a34fd1

Browse files
committed
🤖 CI: added upload config
1 parent 6dd3dff commit 1a34fd1

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/upload.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Build And Upload APK
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build-and-upload:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout the code
14+
uses: actions/checkout@v2
15+
16+
- name: Set up Node.js
17+
uses: actions/setup-node@v2
18+
with:
19+
node-version: '16.x'
20+
21+
- name: Install dependencies
22+
run: npm install
23+
24+
- name: Build the APK
25+
run: |
26+
npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
27+
cd android && ./gradlew assembleRelease
28+
29+
- name: Upload the APK to Uploadcare
30+
run: |
31+
curl -F "UPLOADCARE_PUB_KEY=${{ secrets.UPLOADCARE_PUB_KEY }}" \
32+
-F "file=@./android/app/build/outputs/apk/release/app-release.apk" \
33+
"https://upload.uploadcare.com/base/"

0 commit comments

Comments
 (0)