diff --git a/.github/workflows/tagged-release.yml b/.github/workflows/tagged-release.yml index 6dcf90d..8090f68 100644 --- a/.github/workflows/tagged-release.yml +++ b/.github/workflows/tagged-release.yml @@ -100,7 +100,12 @@ jobs: env: SERVICE_ACCOUNT_BASE64: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT }} run: printf '%s' "$SERVICE_ACCOUNT_BASE64" | base64 --decode > service-account.json - - name: Upload the published AAB to Play internal + - name: Use current delivery lane for manual recovery + if: github.event_name == 'workflow_dispatch' + run: | + git fetch origin master + git show origin/master:fastlane/Fastfile > fastlane/Fastfile + - name: Upload the published APK to Play internal env: TAG: ${{ steps.requested.outputs.tag }} run: | diff --git a/fastlane/Fastfile b/fastlane/Fastfile index d617665..bb65b94 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -59,7 +59,7 @@ platform :android do UI.user_error!("versionCode #{version_code} does not exist on #{track}") unless codes.include?(version_code) end - desc "Upload one already-built AAB and localized metadata to an explicit track" + desc "Upload one already-built APK and localized metadata to an explicit track" lane :upload_release do |options| apk = File.expand_path(options.fetch(:apk)) aab = File.expand_path(options.fetch(:aab)) @@ -79,12 +79,12 @@ platform :android do end upload_to_play_store( package_name: "com.maxistar.textpad", - aab: aab, + apk: apk, json_key: json_key, metadata_path: File.expand_path(options.fetch(:metadata_path)), track: track, release_status: "completed", - skip_upload_apk: true, + skip_upload_aab: true, skip_upload_images: true, skip_upload_screenshots: true ) diff --git a/scripts/test_release_workflows.py b/scripts/test_release_workflows.py index d3bbb15..dfe74a7 100644 --- a/scripts/test_release_workflows.py +++ b/scripts/test_release_workflows.py @@ -35,6 +35,8 @@ def test_tagged_publication_orders_github_before_play(self): self.assertIn("workflow_dispatch:", workflow) self.assertIn('if [ -n "$INPUT_TAG" ]', workflow) self.assertNotIn('EVENT_NAME: ${{ github.event_name }}', workflow) + self.assertIn("if: github.event_name == 'workflow_dispatch'", workflow) + self.assertIn("git show origin/master:fastlane/Fastfile > fastlane/Fastfile", workflow) self.assertIn("sha256sum --check SHA256SUMS", workflow) self.assertIn("environment: release", workflow) @@ -57,6 +59,8 @@ def test_fastlane_release_arguments_are_explicit(self): fastfile = (ROOT / "fastlane" / "Fastfile").read_text(encoding="utf-8") for token in ("aab:", "apk =", "metadata_path:", "json_key:", "track:"): self.assertIn(token, fastfile) + self.assertIn("apk: apk", fastfile) + self.assertIn("skip_upload_aab: true", fastfile) self.assertIn('track_promote_release_status: "completed"', fastfile) self.assertNotIn("rollout:", fastfile)