-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[ci] Adds github action for creating batch release #10298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
reason for override: ci only change |
| create_release_pr: | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| BRANCH_NAME: ${{ github.event.client_payload.package }}-${{ github.run_id }}-${{ github.run_attempt }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the cron job is constantly creating new branches? What cleans up branches that don't actually end up published?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that can be a problem. then I think the right thing to do will be re-use the same branch name and do a clean up before creating a new release
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filed flutter/flutter#177748
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If these files are going to be created as part of the PR process, then the tooling should be updated to understand that, and the override labels shouldn't be needed on this PR. If the PR isn't landable without overrides, then the normal commit path isn't working correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, that part of the work will be in flutter/flutter#176433.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually if a change to repo structure requires updates to our checks we do those two things in the same PR rather than override our own tooling, so it's not clear to me why this is being done separately. That said, since it's isolated to this package and shouldn't affect any normal PRs for now I guess it's fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason I don't do the ci check before this pr is that I would like to finalize the yaml content first, and it can't be finalized until the approach of this PR is reviewed and approved.
and I think doing it as part of this pr may be too distracting for reviewer
|
|
||
| print(' Pushing to remote...'); | ||
| final io.ProcessResult pushResult = | ||
| await repository.runCommand(<String>['push', 'origin', branchName, '--force']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here too, --force seems needlessly dangerous. I don't see why we would need to enable this command to be destructive.
| throw FormatException('Expected "changelog" to be a list, but found ${changelogYaml.runtimeType}.'); | ||
| } | ||
| final List<String> changelog = changelogYaml.nodes | ||
| .map((YamlNode node) => node.value as String) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happened to allowing arbitrary markdown? How would someone make this changelog for instance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can use | for arbitrary markdown in yaml will need to check whether dart yaml support this properly. now I think of it maybe the changelog part of the yaml shouldn't be a list, it should just be a single element that accept arbitrary markdown.
version: major
changelogs: |
my *markdown*
- item **one**
- item two
7be1e87 to
5853905
Compare
5853905 to
48eb6ab
Compare
48eb6ab to
b201825
Compare
| dart ./script/tool/lib/src/main.dart branch-for-batch-release --packages=${{ github.event.client_payload.package }} --branch=${{ env.BRANCH_NAME }} --remote=origin | ||
| - name: Check if branch was created | ||
| id: check-branch-exists | ||
| uses: GuillaumeFalourd/[email protected] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am new to GA, not sure if we are allowed to use GA from marketplace, let me know if this is not allowed.
Also is there a way to test this locally?
fixes flutter/flutter#176425
To set up a batch release cron job for a package, one needs to make a copy of packages/.github/workflows/go_router_batch.yml, and change the name and cron schedule.
The cron job does the following:
batch_release_pr:
Pre-Review Checklist
[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.///).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-assistbot 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
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