Skip to content

Commit 413d59c

Browse files
authored
Merge pull request #226 from maxistar/fix_deploy
upload apk
2 parents d55213e + 0535071 commit 413d59c

3 files changed

Lines changed: 13 additions & 4 deletions

File tree

‎.github/workflows/tagged-release.yml‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,12 @@ jobs:
100100
env:
101101
SERVICE_ACCOUNT_BASE64: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT }}
102102
run: printf '%s' "$SERVICE_ACCOUNT_BASE64" | base64 --decode > service-account.json
103-
- name: Upload the published AAB to Play internal
103+
- name: Use current delivery lane for manual recovery
104+
if: github.event_name == 'workflow_dispatch'
105+
run: |
106+
git fetch origin master
107+
git show origin/master:fastlane/Fastfile > fastlane/Fastfile
108+
- name: Upload the published APK to Play internal
104109
env:
105110
TAG: ${{ steps.requested.outputs.tag }}
106111
run: |

‎fastlane/Fastfile‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ platform :android do
5959
UI.user_error!("versionCode #{version_code} does not exist on #{track}") unless codes.include?(version_code)
6060
end
6161

62-
desc "Upload one already-built AAB and localized metadata to an explicit track"
62+
desc "Upload one already-built APK and localized metadata to an explicit track"
6363
lane :upload_release do |options|
6464
apk = File.expand_path(options.fetch(:apk))
6565
aab = File.expand_path(options.fetch(:aab))
@@ -79,12 +79,12 @@ platform :android do
7979
end
8080
upload_to_play_store(
8181
package_name: "com.maxistar.textpad",
82-
aab: aab,
82+
apk: apk,
8383
json_key: json_key,
8484
metadata_path: File.expand_path(options.fetch(:metadata_path)),
8585
track: track,
8686
release_status: "completed",
87-
skip_upload_apk: true,
87+
skip_upload_aab: true,
8888
skip_upload_images: true,
8989
skip_upload_screenshots: true
9090
)

‎scripts/test_release_workflows.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ def test_tagged_publication_orders_github_before_play(self):
3535
self.assertIn("workflow_dispatch:", workflow)
3636
self.assertIn('if [ -n "$INPUT_TAG" ]', workflow)
3737
self.assertNotIn('EVENT_NAME: ${{ github.event_name }}', workflow)
38+
self.assertIn("if: github.event_name == 'workflow_dispatch'", workflow)
39+
self.assertIn("git show origin/master:fastlane/Fastfile > fastlane/Fastfile", workflow)
3840
self.assertIn("sha256sum --check SHA256SUMS", workflow)
3941
self.assertIn("environment: release", workflow)
4042

@@ -57,6 +59,8 @@ def test_fastlane_release_arguments_are_explicit(self):
5759
fastfile = (ROOT / "fastlane" / "Fastfile").read_text(encoding="utf-8")
5860
for token in ("aab:", "apk =", "metadata_path:", "json_key:", "track:"):
5961
self.assertIn(token, fastfile)
62+
self.assertIn("apk: apk", fastfile)
63+
self.assertIn("skip_upload_aab: true", fastfile)
6064
self.assertIn('track_promote_release_status: "completed"', fastfile)
6165
self.assertNotIn("rollout:", fastfile)
6266

0 commit comments

Comments
 (0)