Skip to content

👷 Simplify artifacts and add test release#39

Merged
IamPekka058 merged 26 commits intomainfrom
ci/simplify-artifacts
Apr 30, 2026
Merged

👷 Simplify artifacts and add test release#39
IamPekka058 merged 26 commits intomainfrom
ci/simplify-artifacts

Conversation

@Friedinger
Copy link
Copy Markdown
Member

@Friedinger Friedinger commented Apr 29, 2026

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-update input, streamlining artifact renaming and upload steps, and consolidating release asset management.

Workflow flexibility and configuration:

  • Added a new skip-version-update input to workflow-build.yml and documented it in the README.md, allowing users to skip updating the version in pubspec.yaml during release builds. This input defaults to false. [1] [2]
  • Updated test-app-workflow.yml to set build-type default to release, specify a release-version, and enable skip-version-update for test builds.

Artifact handling and release process improvements:

  • Refactored artifact renaming and upload logic: replaced dynamic artifact checks and renaming loops with explicit file moves, simplified upload steps, and standardized artifact naming.
  • Consolidated artifact download in the release job by using patterns and merging APK downloads, and updated the release step to attach all assets from a single release-assets directory. [1] [2]
  • Ensured that version update and related artifact uploads only occur if skip-version-update is false, preventing unnecessary commits and uploads when skipping version updates. [1] [2]

Co-authored-by: Copilot <copilot@github.com>
@Friedinger Friedinger added the 👷 CI/CD Changes related to continuous integration/deployment label Apr 29, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 29, 2026

Warning

Rate limit exceeded

@Friedinger has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 52 minutes and 50 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7358e6a9-2c95-481d-8b90-2d814230bb69

📥 Commits

Reviewing files that changed from the base of the PR and between d5dcae6 and 17501f9.

📒 Files selected for processing (1)
  • .github/workflows/workflow-build.yml

Walkthrough

Updates CI workflows: broadened test workflow trigger, added a cleanup job to delete prior test releases, invoked the reusable build workflow with build-type: release, release-version: test-${{ github.ref_name }}, and skip-version-update: true; added skip-version-update input and refactored artifact/symbol handling. README and .gitattributes updated.

Changes

Cohort / File(s) Summary
Test workflow
.github/workflows/test-app-workflow.yml
Trigger broadened to run on all pushes to main (removed path filter). Reusable workflow invocation moved under a test job and now passes build-type: release, release-version: test-${{ github.ref_name }}, and skip-version-update: true.
Build workflow
.github/workflows/workflow-build.yml
Adds on.workflow_call.inputs.skip-version-update and uses it to skip pubspec version updates and related release-time steps. Consolidates Flutter build args, standardizes if: expressions, switches to deterministic mv for artifacts, uploads symbols from build/app/symbols as an _symbols artifact (no zip), and publishes release-assets/* via wildcard.
Close/cleanup workflow
.github/workflows/close-actions.yml
Adds cleanup job for pull_request closed events that runs gh release delete vtest-${{ github.ref_name }} --cleanup-tag -y and ignores missing-release failures.
Docs
README.md
Updates Inputs table formatting and adds skip-version-update boolean input (default false) documenting skipping version updates to pubspec.yaml.
Repo attributes
.gitattributes
Adds * text=auto eol=lf to normalize line endings to LF.

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
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • IamPekka058
  • Ruby11235

Poem

🐰
I hopped through YAML with nimble feet,
Cleared old test releases — tidy and neat,
I nudged the build to release, held the version still,
Artifacts gathered, in orderly spill,
A carrot crunch, and CI’s tune is sweet. 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title references 'test release' and 'simplify artifacts', which align with key changes (test workflow updates and artifact consolidation), but it uses an emoji and is somewhat vague about the specific improvements.
Description check ✅ Passed The description is directly related to the changeset, providing detailed context about workflow improvements, artifact handling, version management, and test release functionality.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/simplify-artifacts

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.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 52 minutes and 50 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@Friedinger Friedinger marked this pull request as ready for review April 29, 2026 16:52
@Friedinger Friedinger requested a review from IamPekka058 April 29, 2026 16:52
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 847224d and e42e2f8.

📒 Files selected for processing (3)
  • .github/workflows/test-app-workflow.yml
  • .github/workflows/workflow-build.yml
  • README.md

Comment thread .github/workflows/workflow-build.yml Outdated
Comment thread .github/workflows/workflow-build.yml
Comment thread .github/workflows/workflow-build.yml
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/workflow-build.yml (1)

149-151: Dead code: VERSION and first VERSION_NAME assignment are immediately overwritten.

Line 151 unconditionally overwrites the VERSION_NAME set in line 150, making lines 149-150 dead code. Additionally, github.event.inputs['release-version'] is for workflow_dispatch inputs, not workflow_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

📥 Commits

Reviewing files that changed from the base of the PR and between e42e2f8 and 71917aa.

📒 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

Comment thread .github/workflows/workflow-build.yml
@Friedinger Friedinger changed the title 👷 Simplify artifact up and downloading 👷 Simplify artifact up and downloading and add test release Apr 29, 2026
@Friedinger Friedinger changed the title 👷 Simplify artifact up and downloading and add test release 👷 Simplify artifacts and add test release Apr 29, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 71917aa and 0ed2f47.

📒 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

Comment thread .github/workflows/close-actions.yml
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 0ed2f47 and d5dcae6.

📒 Files selected for processing (1)
  • .github/workflows/workflow-build.yml

Comment thread .github/workflows/workflow-build.yml
Copy link
Copy Markdown
Member

@IamPekka058 IamPekka058 left a comment

Choose a reason for hiding this comment

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

LGTM, follow up pr with size-analysis test.

@IamPekka058 IamPekka058 merged commit 29de1c7 into main Apr 30, 2026
11 checks passed
@IamPekka058 IamPekka058 deleted the ci/simplify-artifacts branch April 30, 2026 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

👷 CI/CD Changes related to continuous integration/deployment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants