Skip to content

Conversation

@hannah-hyj
Copy link
Member

@hannah-hyj hannah-hyj commented Nov 17, 2025

issue: flutter/flutter#176944

Add a batch Release Flag in the publish command.

The main branch will only publish packages that are opted out of batch release.
The release branch will only publish packages that are opted into batch release.

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2 3

@flutter-dashboard

This comment was marked as resolved.

gemini-code-assist[bot]

This comment was marked as resolved.

@hannah-hyj hannah-hyj changed the title [batch-release] Step2 : publish from the release branch [batch-release] Step2 : Publish pakages from the release branch Nov 17, 2025
@hannah-hyj hannah-hyj changed the title [batch-release] Step2 : Publish pakages from the release branch [batch-release] Step2 : Publish packages from the release branch Nov 18, 2025
@hannah-hyj hannah-hyj requested a review from chunhtai December 9, 2025 00:25
new api

lint

lint

update tests

Update publish_command_test.dart

Update publish_command_test.dart

2

2

Update publish_command_test.dart

lint

Update publish_command.dart

Update release_from_batch_release.yml

Update release.yml

clean up code

Update publish_command.dart

1
release:
uses: ./.github/workflows/release.yml
with:
publish-args: '--all-changed --batch-release --base-sha=HEAD~ --skip-confirmation --remote=origin'
Copy link
Contributor

Choose a reason for hiding this comment

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

feels like this can be a boolean?

publish-args:
required: true
type: string
workflow-name:
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not used?

@@ -1,12 +1,18 @@
name: release
name: Reusable Release
Copy link
Contributor

Choose a reason for hiding this comment

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

this is a weird name. @gemini-code-assist can you suggest a better name for this sub workflow?

Choose a reason for hiding this comment

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

Given the context of the pull request, which introduces a "batch release" flag and focuses on publishing packages from the release branch, a more descriptive name for this reusable workflow would be beneficial.

I suggest Reusable Batch Release to clearly indicate its purpose while retaining the 'reusable' aspect.

Suggested change
name: Reusable Release
name: Reusable Batch Release

Copy link
Contributor

Choose a reason for hiding this comment

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

@gemini-code-assist

This is also going to be used by non batch release

Choose a reason for hiding this comment

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

You're right, Reusable Batch Release is too specific if it's also used for non-batch releases. Given that, Reusable Release is a clear and appropriate name for this workflow, as it accurately reflects its purpose and reusability for all types of releases.

Copy link
Member Author

Choose a reason for hiding this comment

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

@gemini-code-assist
Reusable Batch Release is not a good name since this workflow is shared by 1. release from the main branch (the standard way) and 2. batch release for some packages from their own branches.
any more name suggestions?

Choose a reason for hiding this comment

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

You're right, Reusable Batch Release was indeed too specific. My apologies for that oversight.

Considering that this workflow is designed to be shared across different release types, including both standard releases from the main branch and batch releases from feature branches, a name that emphasizes its generic application to packages would be more fitting.

I suggest Reusable Package Release. This name clearly indicates that the workflow is reusable and focuses on the release of packages, without being tied to a specific release methodology like 'batch' or 'main'.

Suggested change
name: Reusable Release
name: Reusable Package Release

Copy link
Contributor

Choose a reason for hiding this comment

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

well maybe reusable release is fine. nvm then, looks like gemini can't think of a better name neither

- main
jobs:
release:
uses: ./.github/workflows/release.yml
Copy link
Contributor

Choose a reason for hiding this comment

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

This may not work, you will need to checkout source code first before you can run local workflow I think.

I suggest try to do this for release from branches first with code duplicated from release.yaml as subworkflow, and make sure if works before apply the same refactoring to original release from main script

Copy link
Member Author

Choose a reason for hiding this comment

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

sounds good, i will do that

continue;
}
// Skip the package if batch release flag is not set to match the ci_config.yaml
if (getBoolArg(_batchReleaseFlag) != isBatchReleasePackage) {
Copy link
Contributor

Choose a reason for hiding this comment

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

for batch release each branch is targeted for a package. we want to make sure only that package gets published

Copy link
Member Author

Choose a reason for hiding this comment

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

sounds good, i will check the package name here.

Sign up for free to 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.

2 participants