Skip to content

ADFA-2025: Add build folder cleanup after Firebase upload to prevent stale APK issues - #616

Merged
Daniel-ADFA merged 2 commits into
stagefrom
ADFA-2025
Nov 14, 2025
Merged

ADFA-2025: Add build folder cleanup after Firebase upload to prevent stale APK issues#616
Daniel-ADFA merged 2 commits into
stagefrom
ADFA-2025

Conversation

@Daniel-ADFA

Copy link
Copy Markdown
Contributor

@Daniel-ADFA
Daniel-ADFA marked this pull request as ready for review November 12, 2025 22:34
@greptile-apps

Copy link
Copy Markdown
Contributor

Greptile Overview

Greptile Summary

This PR adds cleanup steps to remove the app/build/ folder after Firebase upload in both the release and debug GitHub Actions workflows. The change addresses potential stale APK issues by ensuring build artifacts are cleaned up immediately after successful Firebase uploads. The cleanup steps are strategically positioned after the Firebase deployment but before subsequent workflow steps like notifications, maintaining the existing workflow structure while preventing build artifact accumulation that could interfere with future builds.

Important Files Changed

FilenameScoreOverview
.github/workflows/release.yml5/5Adds build folder cleanup step after Firebase upload to prevent stale APK issues
.github/workflows/debug.yml5/5Adds identical build folder cleanup step after Firebase upload for debug workflow

Confidence score: 5/5

  • This PR is extremely safe to merge with minimal risk as it only adds cleanup operations
  • Score reflects simple, low-risk changes that improve workflow hygiene without affecting core functionality
  • No files require special attention as both changes are identical and straightforward

Sequence Diagram

sequenceDiagram
participant User
participant GitHub
participant SelfHostedRunner
participant Git
participant Nix/Flox
participant Gradle
participant Firebase
participant PostgresDB
participant Slack
participant GoogleCloud
User->>GitHub: "Push to branch or trigger workflow"
GitHub->>SelfHostedRunner: "Start workflow execution"
alt Check Changes Job
SelfHostedRunner->>Git: "Checkout PR branch"
SelfHostedRunner->>Git: "Check if branch differs from stage"
Git-->>SelfHostedRunner: "Return change status"
alt No changes found
SelfHostedRunner->>GitHub: "Skip build (must_build=false)"
end
end
alt Build APK Job (if must_build=true)
SelfHostedRunner->>Git: "Checkout PR branch"
SelfHostedRunner->>Git: "Install Git LFS and pull"
SelfHostedRunner->>Nix/Flox: "Check Nix installation"
alt Nix not installed
SelfHostedRunner->>Nix/Flox: "Install Flox"
end
SelfHostedRunner->>SelfHostedRunner: "Create google-services.json"
SelfHostedRunner->>Nix/Flox: "Activate Flox environment"
Nix/Flox->>Gradle: "Execute gradlew assembleV8Debug"
Gradle-->>SelfHostedRunner: "Generate APK file"
SelfHostedRunner->>SelfHostedRunner: "Find and verify APK"
SelfHostedRunner->>Git: "Extract PR/commit information"
SelfHostedRunner->>GoogleCloud: "Authenticate via Workload Identity"
SelfHostedRunner->>PostgresDB: "Write CI performance data"
SelfHostedRunner->>Firebase: "Deploy APK to App Distribution"
Firebase-->>SelfHostedRunner: "Return deployment URL"
SelfHostedRunner->>SelfHostedRunner: "Clean up build folder"
SelfHostedRunner->>Slack: "Send rich notification with build details"
SelfHostedRunner->>SelfHostedRunner: "Cleanup google-services.json"
end
Loading

@greptile-appsgreptile-appsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@jatezzzjatezzz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@Daniel-ADFA
Daniel-ADFA merged commit 59b2f06 into stageNov 14, 2025
2 checks passed
@Daniel-ADFA
Daniel-ADFA deleted the ADFA-2025 branch November 14, 2025 12:44
jatezzz pushed a commit that referenced this pull request Jun 22, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@Daniel-ADFA@jatezzz@dara-abijo-adfa