Skip to content

fix: dynamically discover AAB path in Play Store deploy workflow#355

Closed
adithya1012 with Copilot wants to merge 2 commits into
mainfrom
copilot/update-playstore-deploy-path
Closed

fix: dynamically discover AAB path in Play Store deploy workflow#355
adithya1012 with Copilot wants to merge 2 commits into
mainfrom
copilot/update-playstore-deploy-path

Conversation

Copilot AI commented May 21, 2026

Copy link
Copy Markdown
Contributor
  • Fetch origin/android_action and switch local branch to android_action
  • Cherry-pick workflow-fix commit 34f655a onto android_action
  • Resolve cherry-pick conflict in .github/workflows/playstore-deploy.yml by keeping the fixed dynamic-path workflow
  • Verify .github/workflows/playstore-deploy.yml contains dynamic AAB discovery and shared ${{ env.AAB_PATH }} usage
  • Push the commit to origin/android_action
  • Do not create a PR
Original prompt

The GitHub Actions workflow in mieweb/pulse is failing in the job from run 26258931566 because .github/workflows/playstore-deploy.yml hard-codes AAB_PATH to android/app/build/outputs/bundle/release/app-release.aab, but the Android build appears to produce the bundle at a different path/name after expo prebuild and ./gradlew bundleRelease.

Please update the workflow so it reliably locates the generated Android App Bundle and uses that path consistently for verification, Play Store upload, artifact upload, and summary output.

Context from the failing run:

  • Workflow: .github/workflows/playstore-deploy.yml
  • Commit: f1358c458e73563cfa928f5fceecf0d608bced04
  • Job: 77287863769
  • Error shown by Actions: Unknown error occurred.
  • Actual failing guard is the Verify AAB exists step, which checks for a fixed file path and exits 1 if not found.
  • The Gradle build itself completed successfully (BUILD SUCCESSFUL).

Likely fix direction:

  • Remove the fragile hard-coded AAB_PATH env value or make it dynamic.
  • After the Gradle build, discover the generated .aab under android/app/build/outputs/bundle (or another correct output directory if needed).
  • Persist the discovered path into $GITHUB_ENV so later steps can use it.
  • Ensure the verify step prints useful diagnostics and that releaseFiles, artifact upload path, and summary all reference the resolved path.
  • Keep the workflow readable and robust for flavor/variant naming differences introduced by Expo/Gradle.

Create a pull request with the fix.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: I ran this and it is failing : Error: Unknown error occurred. can you tell me why it is failing ?

Assistant: Yes — it’s failing because the workflow is checking for the wrong AAB file path, not because the Gradle build itself failed.

What the log shows:

  • Gradle finished successfully: “BUILD SUCCESSFUL in 16m 47s”
  • Immediately after that, the workflow runs a shell check for:
    android/app/build/outputs/bundle/release/app-release.aab
  • That check fails, and then the step exits with code 1.
  • GitHub Actions reports that generic failure as: “Unknown error occurred.”

So the real failure is this artifact check, not the build. The relevant failing lines from the job log are:

if [ ! -f "android/app/build/outputs/bundle/release/app-release.aab" ]; then
  echo "ERROR: AAB not found at android/app/build/outputs/bundle/release/app-release.aab"
  find android/app/build/outputs -type f 2>/dev/null || echo "No outputs found"
  exit 1
fi

Most likely cause:

  • Your build is producing the bundle with a different filename or variant path than app-release.aab.
  • That fits the log because an artifact still gets uploaded afterward, which suggests an AAB likely exists somewhere, just not at the exact path the script expects.

Why I’m confident:

  • The failing job is Deploy to Play Store (Internal Testing) in .github/workflows/playstore-deploy.yml.
  • The build succeeded, then the explicit if [ ! -f ... ] guard failed, then the job emitted ##[error]Unknown error occurred.

What to check next:

  1. Open .github/workflows/playstore-deploy.yml
  2. Find the step that validates:
    android/app/build/outputs/bundle/release/app-release.aab
  3. Compare that path to the actual generated output under:
    android/app/build/outputs/bundle/...

Common alternatives are things like:

  • android/app/build/outputs/bundle/release/app-prod-release.aab
  • android/app/build/outputs/bundle/<flavor>Release/...
  • a different module name instead of app

If you want, I can help you fix the workflow by locating the exact generated AAB path in the repo and telling you what line in .github/workflows/playstore-deploy.yml should change.

User: fix it.

Assistant: I’m waiting for your confirmation on the proposed repository change, and as soon as you approve it I’ll continue with the fix.

This pull request was created from Copilot chat.

Copilot AI changed the title [WIP] Update playstore-deploy workflow to locate AAB reliably fix: dynamically discover AAB path in Play Store deploy workflow May 21, 2026
Copilot AI requested a review from adithya1012 May 21, 2026 23:52
@adithya1012

Copy link
Copy Markdown
Collaborator

@copilot https://github.com/mieweb/pulse/actions/runs/26260572072/job/77292889145

it is failing in Verify AAB file

Run if [ ! -f "android/app/build/outputs/bundle/release/release.aab" ]; then
if [ ! -f "android/app/build/outputs/bundle/release/release.aab" ]; then
echo "ERROR: AAB not found at android/app/build/outputs/bundle/release/release.aab"
find android/app/build/outputs -type f 2>/dev/null || echo "No outputs found"
exit 1
fi
echo "AAB verified: $(ls -lh android/app/build/outputs/bundle/release/release.aab)"
shell: /usr/bin/bash -e {0}
env:
PACKAGE_NAME: com.mieweb.pulse
AAB_PATH: android/app/build/outputs/bundle/release/release.aab
JAVA_VERSION: 17
NODE_VERSION: 20
JAVA_HOME: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.19-10/x64
JAVA_HOME_17_X64: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.19-10/x64
VERSION: 1.2.1
ERROR: AAB not found at android/app/build/outputs/bundle/release/release.aab
android/app/build/outputs/bundle/release/app-release.aab
android/app/build/outputs/logs/manifest-merger-release-report.txt
Error: Process completed with exit code 1.

Copilot AI commented May 25, 2026

Copy link
Copy Markdown
Contributor Author

@copilot https://github.com/mieweb/pulse/actions/runs/26260572072/job/77292889145

it is failing in Verify AAB file ...

You’re right — that failure is from the hardcoded release/release.aab path. The fix is in commit 34f655a, which dynamically locates the generated .aab and sets AAB_PATH before verify/upload/artifact steps. Please cherry-pick 34f655a onto android_action and re-run the workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants