From bc77f8936b63a9a844322c65c4d58aead7e53f3e Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Thu, 30 Jul 2026 23:13:42 +0200 Subject: [PATCH] Resolve the Play AAB path against the project root fastlane chdirs into fastlane/ before running a lane, so the relative dist/app-release.aab the release pipeline passed resolved to fastlane/dist/app-release.aab and the 2.17.1 upload aborted. The lane now expands relative paths against the project root, and the workflow hands it an absolute path. --- .gitea/workflows/release.yaml | 8 ++++++-- fastlane/Fastfile | 9 ++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index 0e9ce38..b821041 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -635,9 +635,13 @@ jobs: FASTLANE_HIDE_CHANGELOG: '1' run: | set -euo pipefail - test -f "dist/app-release.aab" + AAB="$GITHUB_WORKSPACE/dist/app-release.aab" + # Absolute, because a lane body runs from fastlane/, not the + # workspace root — a relative path resolves against the wrong + # directory there and 2.17.1 died on exactly that. + test -f "$AAB" || { echo "No AAB at $AAB — the artifact handoff failed." >&2; ls -la dist || true; exit 1; } bundle exec fastlane deploy \ - aab:"dist/app-release.aab" \ + aab:"$AAB" \ track:"$PLAY_TRACK" \ release_status:"$PLAY_RELEASE_STATUS" \ dry_run:"$PLAY_DRY_RUN" diff --git a/fastlane/Fastfile b/fastlane/Fastfile index ab0256d..459651d 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -14,10 +14,17 @@ default_platform(:android) +# fastlane runs a lane body with the working directory set to `fastlane/`, not +# the project root, so a relative artifact path from the caller has to be +# resolved explicitly. Absolute paths pass through untouched. +def project_path(path) + File.expand_path(path, File.expand_path("..", FastlaneCore::FastlaneFolder.path || ".")) +end + platform :android do desc "Upload an already-built, already-signed AAB to Play" lane :deploy do |options| - aab = options[:aab] || "app/build/outputs/bundle/release/app-release.aab" + aab = project_path(options[:aab] || "app/build/outputs/bundle/release/app-release.aab") UI.user_error!("AAB not found at #{aab}") unless File.exist?(aab) supply(