👷 Simplify artifacts and add test release#39
Conversation
Co-authored-by: Copilot <copilot@github.com>
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughUpdates CI workflows: broadened test workflow trigger, added a cleanup job to delete prior test releases, invoked the reusable build workflow with Changes
Sequence Diagram(s)sequenceDiagram
participant GitHub as GitHub Event
participant Runner as Actions Runner
participant Cleanup as Cleanup Job
participant TestJob as Test Job
participant Reusable as Reusable Build Workflow
participant Artifacts as Artifact Storage
GitHub->>Runner: push / pull_request closed
alt pull_request closed
Runner->>Cleanup: run cleanup job
Cleanup->>GitHub: gh release delete vtest-${{ github.ref_name }} --cleanup-tag -y
Cleanup-->>Runner: success or tolerated failure
end
alt push to main
Runner->>TestJob: start test job
TestJob->>Reusable: invoke (build-type=release, release-version=test-${{ github.ref_name }}, skip-version-update=true)
Reusable->>Artifacts: build, move artifacts, upload symbols and release-assets/*
Reusable->>GitHub: create/update GitHub Release with release-assets/*
Reusable-->>TestJob: complete
TestJob-->>Runner: complete
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 52 minutes and 50 seconds.Comment |
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
…zipping step Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/workflow-build.yml:
- Around line 177-180: The release-step currently silences missing artifacts by
using "mv ... || echo ..." which allows the pipeline to continue with partial
assets; update the four moves that reference BUILD_DIR, BASE_NAME and
steps.build_options.outputs.flavor so that a missing APK/AAB causes the job to
fail (e.g. remove the "|| echo" and ensure mv returns non-zero, or replace the
fallback with a failing handler that echoes the missing file and exits
non-zero). Make the change for the three APK lines and the AAB line so missing
expected release binaries fail fast instead of being skipped.
- Line 121: Replace string comparisons of the boolean workflow input with direct
boolean checks: locate all conditional expressions using
inputs['skip-version-update'] == 'false' (and similar) and change them to use
boolean negation (!inputs['skip-version-update']) or explicit === false; update
the conditions in the steps that currently read inputs['build-type'] ==
'release' && inputs['release-version'] && inputs['skip-version-update'] ==
'false' and any other occurrences (e.g., the checks around
inputs['skip-version-update']) so they evaluate correctly when the input is a
boolean.
- Around line 182-204: The upload steps "Upload APK arm64-v8a", "Upload APK
armeabi-v7a", "Upload APK x86_64" and "Upload app bundle" are missing explicit
name fields so the artifact names don't match the release job's download
patterns; add a matching name: entry to each upload-artifact step using the same
template the downloader expects — e.g. for the APK steps set name: ${{
inputs['app-name'] }}_${{ steps.build_options.outputs.version_name
}}_arm64-v8a.apk (and similarly _armeabi-v7a.apk and _x86_64.apk), and for
"Upload app bundle" set name: ${{ inputs['app-name'] }}_${{
steps.build_options.outputs.version_name }}.aab so the release job's pattern and
name-based downloads will find them.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 37adbdb3-bb38-43cf-b088-60e85d18a1ad
📒 Files selected for processing (3)
.github/workflows/test-app-workflow.yml.github/workflows/workflow-build.ymlREADME.md
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/workflow-build.yml (1)
149-151: Dead code:VERSIONand firstVERSION_NAMEassignment are immediately overwritten.Line 151 unconditionally overwrites the
VERSION_NAMEset in line 150, making lines 149-150 dead code. Additionally,github.event.inputs['release-version']is forworkflow_dispatchinputs, notworkflow_call— it would always be empty in this reusable workflow context.♻️ Proposed fix to remove dead code
SHA="${{ github.event.pull_request.head.sha || github.sha }}" SHORT_SHA="${SHA:0:7}" - VERSION="${{ github.event.inputs['release-version'] }}" - VERSION_NAME="${VERSION:-$(echo "$GITHUB_REF_NAME" | tr / _)}_${SHORT_SHA}" VERSION_NAME="$(echo "$GITHUB_REF_NAME" | tr / _)_$SHORT_SHA" FLAVOR="${{ inputs['build-type'] == 'release' && 'production' || 'staging' }}"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/workflow-build.yml around lines 149 - 151, Remove the dead assignments and only set VERSION_NAME once; delete the VERSION assignment and the first VERSION_NAME line that tries to use github.event.inputs['release-version'], and keep a single deterministic assignment like VERSION_NAME="$(echo "$GITHUB_REF_NAME" | tr / _)_$SHORT_SHA"; ensure any real "release-version" input (if needed) is retrieved from the correct source for this reusable workflow instead of relying on github.event.inputs['release-version'] if that is not applicable.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/workflow-build.yml:
- Around line 120-123: The "Update pubspec.yaml version" workflow step currently
activates pub_version_plus but never runs the version update; modify that step
(named "Update pubspec.yaml version") to call the pubversion CLI after
activation (e.g., run "pubversion set <version>" using the release-version
input) so pubspec.yaml is actually updated when inputs['build-type'] ==
'release' and inputs['skip-version-update'] is false; alternatively, if
versioning is handled elsewhere remove this step entirely.
---
Nitpick comments:
In @.github/workflows/workflow-build.yml:
- Around line 149-151: Remove the dead assignments and only set VERSION_NAME
once; delete the VERSION assignment and the first VERSION_NAME line that tries
to use github.event.inputs['release-version'], and keep a single deterministic
assignment like VERSION_NAME="$(echo "$GITHUB_REF_NAME" | tr / _)_$SHORT_SHA";
ensure any real "release-version" input (if needed) is retrieved from the
correct source for this reusable workflow instead of relying on
github.event.inputs['release-version'] if that is not applicable.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: bd4fe73f-f7e9-4cd4-a7fd-236ced30c48a
📒 Files selected for processing (3)
.github/workflows/close-actions.yml.github/workflows/test-app-workflow.yml.github/workflows/workflow-build.yml
🚧 Files skipped from review as they are similar to previous changes (1)
- .github/workflows/test-app-workflow.yml
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/close-actions.yml:
- Around line 25-28: The "Delete previous test release" step currently masks
errors and the job lacks explicit write permission; update the job (the cleanup
job that contains the step running gh release delete vtest-${{ github.ref_name
}}) to declare permissions: contents: write under the job's permissions block so
the GH_TOKEN has explicit write access, and remove the "|| echo 'No previous
release to delete'" from the run command so failures (auth/permission errors or
other deletion problems) surface; if you need non-failing behavior for missing
releases, replace the shell suppression with an explicit conditional check
(e.g., check for an existing release before calling gh release delete) rather
than swallowing all errors.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 42cf311e-e85c-4338-8e4f-7d1abf27bf9b
📒 Files selected for processing (4)
.gitattributes.github/workflows/close-actions.yml.github/workflows/test-app-workflow.yml.github/workflows/workflow-build.yml
✅ Files skipped from review due to trivial changes (1)
- .gitattributes
🚧 Files skipped from review as they are similar to previous changes (2)
- .github/workflows/test-app-workflow.yml
- .github/workflows/workflow-build.yml
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/workflow-build.yml:
- Around line 281-292: The Download pubspec.yaml step currently uses
actions/download-artifact without a path, so the artifact lands in the workspace
root and won't match the files path used by the Commit pubspec.yaml step; update
the "Download pubspec.yaml" step (named "Download pubspec.yaml") to add a with:
path that targets the working-directory input (e.g. set path to "${{
inputs['working-directory'] }}" so pubspec.yaml is downloaded into the same
subdirectory referenced by the Commit pubspec.yaml step and the files: argument
will point to the correct file.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 26e4f4e9-4ff3-4b63-a48d-10519fb7b1e7
📒 Files selected for processing (1)
.github/workflows/workflow-build.yml
IamPekka058
left a comment
There was a problem hiding this comment.
LGTM, follow up pr with size-analysis test.
This pull request updates the GitHub Actions workflows for building and releasing Flutter apps, focusing on improving artifact handling, adding flexibility to version management, and simplifying the release process. The main changes include introducing a
skip-version-updateinput, streamlining artifact renaming and upload steps, and consolidating release asset management.Workflow flexibility and configuration:
skip-version-updateinput toworkflow-build.ymland documented it in theREADME.md, allowing users to skip updating the version inpubspec.yamlduring release builds. This input defaults tofalse. [1] [2]test-app-workflow.ymlto setbuild-typedefault torelease, specify arelease-version, and enableskip-version-updatefor test builds.Artifact handling and release process improvements:
release-assetsdirectory. [1] [2]skip-version-updateisfalse, preventing unnecessary commits and uploads when skipping version updates. [1] [2]