From 1a232fc71a868704cdfe2dcf7ee0b492c5a5386e Mon Sep 17 00:00:00 2001 From: ayushya Date: Thu, 1 Oct 2026 09:14:26 -0400 Subject: [PATCH] Drop Play Console upload from the Release workflow The Release-* workflow now only builds Noo-.aab and attaches it to the Gitea release. The now-unused upload script is removed with it. Co-Authored-By: Claude Code --- .gitea/workflows/release.yml | 24 --------------- tool/upload_play_bundle.py | 58 ------------------------------------ 2 files changed, 82 deletions(-) delete mode 100644 tool/upload_play_bundle.py diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 5393067..c2efea5 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -77,27 +77,3 @@ jobs: uses: akkuman/gitea-release-action@v1 with: files: ${{ env.AAB_PATH }} - - - name: Decode Play Console service account key - # Skipped (rather than failing the whole run) until the secret is - # set up - see tool/upload_play_bundle.py's doc comment for what - # that setup involves and its one hard prerequisite: Google won't - # accept API calls for an app that's never had a single manual - # upload through the Play Console web UI. - if: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON_BASE64 != '' }} - run: echo "$SERVICE_ACCOUNT_JSON_BASE64" | base64 -d > "${{ runner.temp }}/play-service-account.json" - env: - SERVICE_ACCOUNT_JSON_BASE64: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON_BASE64 }} - - - name: Upload App Bundle to Play Console library - # Deliberately doesn't touch any release track - see - # tool/upload_play_bundle.py. Uploaded bundles show up under - # Release > App bundle explorer in Play Console, ready to promote - # to a track by hand whenever it's actually time to ship. - if: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON_BASE64 != '' }} - run: | - pip install --quiet google-api-python-client google-auth - python3 tool/upload_play_bundle.py "${{ env.AAB_PATH }}" - env: - GOOGLE_PLAY_PACKAGE_NAME: dev.ayushya.noo - GOOGLE_PLAY_SERVICE_ACCOUNT_JSON_PATH: ${{ runner.temp }}/play-service-account.json diff --git a/tool/upload_play_bundle.py b/tool/upload_play_bundle.py deleted file mode 100644 index d251142..0000000 --- a/tool/upload_play_bundle.py +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env python3 -"""Uploads an .aab to the Play Console's app bundle library, without -touching any release track. - -Play Console itself doesn't expose "just upload, don't release" as an -action - every path through the UI attaches a bundle to a track. The Play -Developer API does support it though: open an edit, upload the bundle, -commit the edit, and stop there. The result shows up under Release > App -bundle explorer and nowhere else - nothing goes out to testers or -production until it's promoted to a track by hand, whenever that's wanted. - -Needs: - GOOGLE_PLAY_PACKAGE_NAME e.g. dev.ayushya.noo - GOOGLE_PLAY_SERVICE_ACCOUNT_JSON_PATH path to a service account key file - -The Play Developer API can't create an app's first release - Google -requires at least one manual upload through the Play Console web UI (to -any track) before it'll accept API calls for that app at all. - - python3 tool/upload_play_bundle.py path/to/app-release.aab -""" -import os -import sys - -from google.oauth2 import service_account -from googleapiclient.discovery import build - -SCOPES = ["https://www.googleapis.com/auth/androidpublisher"] - - -def main(bundle_path): - package_name = os.environ["GOOGLE_PLAY_PACKAGE_NAME"] - key_path = os.environ["GOOGLE_PLAY_SERVICE_ACCOUNT_JSON_PATH"] - creds = service_account.Credentials.from_service_account_file( - key_path, scopes=SCOPES - ) - service = build("androidpublisher", "v3", credentials=creds) - - edit_id = service.edits().insert(body={}, packageName=package_name).execute()["id"] - - bundle = ( - service.edits() - .bundles() - .upload(editId=edit_id, packageName=package_name, media_body=bundle_path) - .execute() - ) - print("Uploaded versionCode %s" % bundle["versionCode"]) - - service.edits().commit(editId=edit_id, packageName=package_name).execute() - print( - "Committed - visible under Release > App bundle explorer in Play " - "Console. Not attached to any track, so nothing goes out to " - "testers or production until it's promoted by hand." - ) - - -if __name__ == "__main__": - main(sys.argv[1])