Skip to content

Commit

Permalink
updated to build assets folder if its not there and run the build rel…
Browse files Browse the repository at this point in the history
…ease
  • Loading branch information
shreya-mishra committed Oct 9, 2023
1 parent c7dd18c commit 72e945f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,21 @@ jobs:
- name: Make Gradlew Executable
run: cd android && chmod +x ./gradlew

- name: build release
run: npx react-native bundle --platform android --dev false --entry-file index.js --assets-dest cd android/app/src/main && mkdir assets --bundle-output index.android.bundle && cd android && ./gradlew assembleDebug
- name: Build assets folder
run: |
cd android/app/src/main &&
if [ -d "assets" ]; then
rm -r assets
fi
- name: Build release
run: |
mkdir -p android/app/src/main/assets &&
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 &&
cd android &&
./gradlew assembleDebug
- name: list files
run: ls -lrt android/app/build/outputs/apk/debug
run: ls -lrt android/app/build/outputs/apk/release

- name: upload artifact to Firebase App Distribution
uses: wzieba/[email protected]
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"format-check": "prettier --check ./src",
"format-fix": "prettier --write ./src",
"precommit-check": "yarn run format-fix && yarn run lint",
"build": "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; cd android ; ./gradlew assembleDebug"
"build-assets-folder": "cd android/app/src/main && if [ -d 'assets' ]; then rm -r assets; fi",
"build": "mkdir -p android/app/src/main/assets && 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 && cd android && ./gradlew assembleDebug"
},
"dependencies": {
"@react-native-async-storage/async-storage": "^1.15.16",
Expand Down

0 comments on commit 72e945f

Please sign in to comment.