Skip to content

Commit

Permalink
Merge pull request #297 from Real-Dev-Squad/fix/Pipeline.yml
Browse files Browse the repository at this point in the history
updated to build assets folder if its not there and run the build rel…
  • Loading branch information
shreya-mishra authored Oct 9, 2023
2 parents 521b748 + 72e945f commit 566acb5
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 566acb5

Please sign in to comment.