Optimize Android publish workflow by splitting PR and release build paths#109
Merged
AbandonedCart merged 4 commits intomainfrom Apr 18, 2026
Merged
Optimize Android publish workflow by splitting PR and release build paths#109AbandonedCart merged 4 commits intomainfrom
AbandonedCart merged 4 commits intomainfrom
Conversation
Agent-Logs-Url: https://github.com/intro-skipper/segment-editor-mobile/sessions/99b96c3a-4993-49a8-9105-15a9442423f1 Co-authored-by: AbandonedCart <1173913+AbandonedCart@users.noreply.github.com>
Agent-Logs-Url: https://github.com/intro-skipper/segment-editor-mobile/sessions/99b96c3a-4993-49a8-9105-15a9442423f1 Co-authored-by: AbandonedCart <1173913+AbandonedCart@users.noreply.github.com>
Agent-Logs-Url: https://github.com/intro-skipper/segment-editor-mobile/sessions/99b96c3a-4993-49a8-9105-15a9442423f1 Co-authored-by: AbandonedCart <1173913+AbandonedCart@users.noreply.github.com>
Agent-Logs-Url: https://github.com/intro-skipper/segment-editor-mobile/sessions/99b96c3a-4993-49a8-9105-15a9442423f1 Co-authored-by: AbandonedCart <1173913+AbandonedCart@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
AbandonedCart
April 18, 2026 21:24
View session
Contributor
Reviewer's GuideSplits the Android GitHub Actions workflow into distinct PR-validation and release build paths, simplifies build metadata generation, and tightens conditions around signing and artifact/release handling to reduce CI time and overhead. Sequence diagram for PR vs release Android build in GitHub ActionssequenceDiagram
actor Developer
participant GitHub
participant Android_CI_Workflow
participant Gradle
participant Sign_Action
participant Upload_Artifact
participant GitHub_Releases
Developer->>GitHub: Open_PR_or_push_tag
GitHub->>Android_CI_Workflow: Trigger_android.yml
Android_CI_Workflow->>Android_CI_Workflow: Checkout_repo
Android_CI_Workflow->>Android_CI_Workflow: Set_build_hash_from_GITHUB_SHA
Android_CI_Workflow->>Android_CI_Workflow: Setup_JDK_and_Android_SDK
alt pull_request_event
Android_CI_Workflow->>Gradle: :app:compileGithubDebugKotlin
Gradle-->>Android_CI_Workflow: Compile_result_for_PR_validation
Android_CI_Workflow-->>GitHub: Report_PR_check_status
else non_pull_request_event
Android_CI_Workflow->>Gradle: assembleGithubRelease
Gradle-->>Android_CI_Workflow: Release_APK
Android_CI_Workflow->>Sign_Action: Sign_release_APK
Sign_Action-->>Android_CI_Workflow: Signed_APK
Android_CI_Workflow->>Upload_Artifact: Upload_signed_APK
Upload_Artifact-->>Android_CI_Workflow: Artifact_URL
Android_CI_Workflow->>GitHub_Releases: Create_or_update_release
GitHub_Releases-->>Android_CI_Workflow: Release_published
Android_CI_Workflow-->>GitHub: Report_workflow_status
end
Flow diagram for Android CI workflow split by eventflowchart TD
A[GitHub_event_trigger
pull_request_or_other] --> B[Run_android_CI_workflow]
B --> C{Event_is_pull_request}
C -- yes --> D[Checkout_repo
fetch-depth_1
submodules_false]
D --> E[Set_build_hash
from_GITHUB_SHA]
E --> F[Setup_JDK_17]
F --> G[Setup_Android_SDK]
G --> H[Run_Gradle_PR_checks
:app:compileGithubDebugKotlin
configuration-cache_true]
C -- no --> D2[Checkout_repo
fetch-depth_1
submodules_false]
D2 --> E2[Set_build_hash
from_GITHUB_SHA]
E2 --> F2[Setup_JDK_17]
F2 --> G2[Setup_Android_SDK]
G2 --> H2[Run_Gradle_release_build
assembleGithubRelease]
H2 --> I[Sign_release_APK]
I --> J[Upload_artifact
compression-level_0]
J --> K[Create_GitHub_release]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- You removed the
GIT_BRANCHenvironment variable; double-check any downstream steps or external consumers that might still rely on it and either keep setting it or update those usages accordingly. - Using
github.event_name != 'pull_request'for the release path will also run the heavy build for events likeworkflow_dispatchorpushon non-release branches; consider tightening this condition if you only want full releases on specific events or branches.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- You removed the `GIT_BRANCH` environment variable; double-check any downstream steps or external consumers that might still rely on it and either keep setting it or update those usages accordingly.
- Using `github.event_name != 'pull_request'` for the release path will also run the heavy build for events like `workflow_dispatch` or `push` on non-release branches; consider tightening this condition if you only want full releases on specific events or branches.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Publishing was slower than necessary because PR validation and release publishing shared the same heavy build path. This change separates fast feedback from publish-critical work while preserving release behavior.
Build-path split by event
:app:compileGithubDebugKotlin).assembleGithubRelease).Publish-only steps isolated
Workflow overhead reductions
GITHUB_SHA.compression-level: 0to reduce publish-path CPU time.Summary by Sourcery
Split the Android workflow into separate paths for fast PR validation and full release publishing, while tightening checkout and artifact settings for efficiency.
Enhancements: