← Back to Pull requests

Automate App Store and Play Store releases with API scripts #119

Closed
unknown closed this pull request without merging on Nov 16, 2026 06:00 UTC
View on GitHub
unknown unknown commented on Nov 16, 2026 05:27 UTC
Author

Summary

Adds automated release workflows for both iOS (App Store Connect) and Android (Google Play) platforms, eliminating manual console clicks during the guided release process. Includes API client scripts, comprehensive test suites, build artifact verification, and CI integration for signed builds.

Changes

  • App Store Connect automation (scripts/asc_api.py): Handles build processing waits, TestFlight group assignment, version creation, build selection, metadata submission, and release approval via the ASC API. Includes JWT signing with ES256 and DER signature conversion.
  • Google Play automation (scripts/play_publish.py): Manages AAB uploads to Internal testing and promotion to Production tracks via the androidpublisher v3 API. Includes RS256 JWT signing via openssl.
  • Build artifact verification:

  • - scripts/verify_aab.py: Validates Android App Bundle contents (native libraries, 16 KB page alignment, manifest integrity, version codes)
    - scripts/verify_aab_selftest.py: Comprehensive test suite for the AAB verifier

  • Test suites:

  • - scripts/asc_api_selftest.py: Tests ASC API script against a fake App Store Connect with JWT signature verification
    - scripts/play_publish_selftest.py: Tests Play API script against a fake androidpublisher with JWT verification

  • CI/CD integration:

  • - .github/workflows/release-build.yml: New workflow for building and signing store artifacts in GitHub Actions with build provenance attestation
    - scripts/release-build-tag.sh: Helper to create release tags in the build workflow

  • Release script updates:

  • - scripts/release-lib.sh: Added --skip-device-tests, --host-tests, --ci-build/--local-build, and --status flags; support for shared release records; device test argument configuration
    - scripts/release-apple.sh: Integrated ASC API automation, CI build support, and IPA verification
    - scripts/release-android.sh: Integrated Play API automation, CI build support, and AAB verification
    - scripts/release-lib-selftest.sh: Extended tests for new flags and shared record functionality

  • Documentation updates (docs/RELEASE.md, docs/APP_STORE_SUBMISSION.md, docs/BUILD_AND_TEST.md): Documented new API-based workflows, CI build option, and device test behavior
  • Configuration:

  • - ios/Flutter/Release.xcconfig: Added signing overrides for unattended CI builds
    - ios/.gitignore: Added ReleaseSigning.xcconfig
    - .github/workflows/ci.yml: Added AAB verifier self-test

    Testing

  • The CI mirror passes (./scripts/test.sh) — all self-tests for the new scripts are integrated

  • New test suites validate API scripts against fake endpoints with JWT signature verification

  • AAB verifier tested against synthetic bundles with various ELF alignments and manifest configurations

  • Release lib tests extended to cover new flags and shared record behavior
  • The changes are covered by comprehensive self-tests that run in CI and locally. The API scripts use stdlib only (Python 3.9+) with openssl for signing, matching the project's constraints for release machines.

    <!-- codesmith:footer -->
    ---
    <a href="https://backend.blacksmith.sh/track/enable-autofix?expires=1797398837&installation_model_id=429530&pr_number=119&ref=codesmith_pr_footer&repository=liberatedbread%2Fliberatedbread-mobile&return_to=https%3A%2F%2Fgithub.com%2Fliberatedbread%2Fliberatedbread-mobile%2Fpull%2F119&signature=43077ede0e5a84af43256d5110400a631690a64c0f32400755c57148e44ea85a"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-light.svg"><img alt="Autofix with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png" width="190" height="28"></picture></a>
    <sup><a href="https://app.blacksmith.sh/liberatedbread/codesmith/liberatedbread-mobile/pr/119?autoLogin=true&ref=codesmith_pr_footer">Open in [code]smith</a> · Need help on this PR? Tag <code>@codesmith-bot</code> with what you need.</sup>

    <!-- codesmith:autofix:disabled -->
    <!-- /codesmith:footer -->

    Diff: 535 lines (+401 / -134) across 6 files Reviewer: holdenk Review duration: 33m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.48) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.48 · 535 lines diff across 6 files
    0.48
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.376
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #119"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 47.9% (MEDIUM) · Higher = larger blast radius
    47.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 20.7% · Safe to merge
    20.7%