diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index e85a2ed7..81fd85e8 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -110,7 +110,7 @@ jobs: if: ${{ matrix.platform == 'android' }} with: name: 'AndroidAPK${{ matrix.react-native-version }}' - path: ./Apps/BRNPlayground/android/app/build/outputs/apk/release + path: ./Apps/BRNPlayground/apk - name: Upload iOS App uses: actions/upload-artifact@v4 if: ${{ matrix.platform == 'ios' }} diff --git a/Package/gulpfile.js b/Package/gulpfile.js index 447e2a82..7c6b2809 100644 --- a/Package/gulpfile.js +++ b/Package/gulpfile.js @@ -103,12 +103,19 @@ const buildAndroid = async () => { const buildAndroidRNTA = async () => { const basekitBuildProp = basekitBuild ? "-PBASEKIT_BUILD=1" : ""; exec(`./gradlew app:assembleRelease --stacktrace --info ${basekitBuildProp}`, '../Apps/BRNPlayground/android'); - const baseKitOrFull = basekitBuild ? '-basekit' : '-full'; - const oldPath = '../Apps/BRNPlayground/android/app/build/outputs/apk/release/app-release.apk'; - const newPath = `../Apps/BRNPlayground/android/app/build/outputs/apk/release/app-release${baseKitOrFull}.apk`; + const baseKitOrFull = basekitBuild ? '-basekit' : ''; + const srcFile = '../Apps/BRNPlayground/android/app/build/outputs/apk/release/app-release.apk'; + const newName = `app-release${baseKitOrFull}.apk`; - fs.rename(oldPath, newPath, function (err) { - if (err) throw err; + const apkFolder = '../Apps/BRNPlayground/apk'; + if (!fs.existsSync(apkFolder)) { + fs.mkdirSync(apkFolder, { recursive: true }); + } + await new Promise(resolve => { + gulp.src(srcFile) + .pipe(rename(newName)) + .pipe(gulp.dest(apkFolder)) + .on('end', resolve); }); };