mui-x icon indicating copy to clipboard operation
mui-x copied to clipboard

[infra] Add automated release PR creation script

Open michelengelen opened this issue 7 months ago โ€ข 12 comments

Had this idea for a while now and finally got a bit of time to work on it.

Makes the whole process of creating a release PR a bit easier. It basically does everything automatically up until the point of creating a PR.

Let me know what you think.

And I did tidy up the changelog creation script a bit as well while i was at it ๐Ÿงน

michelengelen avatar Jun 12 '25 09:06 michelengelen

Deploy preview: https://deploy-preview-18345--material-ui-x.netlify.app/

Bundle size report

Total Size Change: 0B(0.00%) - Total Gzip Change: 0B(0.00%) Files: 122 total (0 added, 0 removed, 0 changed)

Show details for 100 more bundles (22 more not shown)

@mui/x-chartsโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts-proโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts-pro/BarChartProโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts-pro/ChartContainerProโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts-pro/ChartDataProviderProโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts-pro/ChartsToolbarProโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts-pro/ChartZoomSliderโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts-pro/FunnelChartโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts-pro/Heatmapโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts-pro/LineChartProโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts-pro/PieChartProโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts-pro/RadarChartProโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts-pro/ScatterChartProโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts/BarChartโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts/ChartContainerโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts/ChartDataProviderโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts/ChartsAxisโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts/ChartsAxisHighlightโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts/ChartsClipPathโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts/ChartsGridโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts/ChartsLabelโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts/ChartsLegendโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts/ChartsLocalizationProviderโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts/ChartsOverlayโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts/ChartsReferenceLineโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts/ChartsSurfaceโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts/ChartsTextโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts/ChartsTooltipโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts/ChartsXAxisโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts/ChartsYAxisโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts/Gaugeโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts/LineChartโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts/PieChartโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts/RadarChartโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts/ScatterChartโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts/SparkLineChartโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-charts/Toolbarโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-data-gridโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-data-grid-premiumโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-data-grid-premium/DataGridPremiumโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-data-grid-proโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-data-grid-pro/DataGridProโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-data-grid/DataGridโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickersโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers-proโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers-pro/AdapterDateFnsโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers-pro/AdapterDateFnsJalaliโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers-pro/AdapterDayjsโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers-pro/AdapterLuxonโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers-pro/AdapterMomentโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers-pro/AdapterMomentHijriโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers-pro/AdapterMomentJalaaliโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers-pro/DateRangeCalendarโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers-pro/DateRangePickerโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers-pro/DateRangePickerDayโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers-pro/DateRangePickerDay2โ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers-pro/DateTimeRangePickerโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers-pro/DesktopDateRangePickerโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers-pro/DesktopDateTimeRangePickerโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers-pro/DesktopTimeRangePickerโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers-pro/LocalizationProviderโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers-pro/MobileDateRangePickerโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers-pro/MobileDateTimeRangePickerโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers-pro/MobileTimeRangePickerโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers-pro/MultiInputDateRangeFieldโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers-pro/MultiInputDateTimeRangeFieldโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers-pro/MultiInputTimeRangeFieldโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers-pro/PickersRangeCalendarHeaderโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers-pro/SingleInputDateRangeFieldโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers-pro/SingleInputDateTimeRangeFieldโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers-pro/SingleInputTimeRangeFieldโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers-pro/StaticDateRangePickerโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers-pro/TimeRangePickerโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers/AdapterDateFnsโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers/AdapterDateFnsBaseโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers/AdapterDateFnsJalaliโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers/AdapterDayjsโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers/AdapterLuxonโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers/AdapterMomentโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers/AdapterMomentHijriโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers/AdapterMomentJalaaliโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers/DateCalendarโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers/DateFieldโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers/DatePickerโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers/DateTimeFieldโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers/DateTimePickerโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers/DayCalendarSkeletonโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers/DesktopDatePickerโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers/DesktopDateTimePickerโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers/DesktopTimePickerโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers/DigitalClockโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers/LocalizationProviderโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers/MobileDatePickerโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers/MobileDateTimePickerโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers/MobileTimePickerโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers/MonthCalendarโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers/MultiSectionDigitalClockโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers/PickerDay2โ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers/PickersActionBarโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%) @mui/x-date-pickers/PickersCalendarHeaderโ€ƒparsed: 0B(0.00%) gzip: 0B(0.00%)

Details of bundle changes

Generated by :no_entry_sign: dangerJS against d54af6b4c07f82fc1f73500893673f56ac5f774f

mui-bot avatar Jun 12 '25 09:06 mui-bot

I like the aspect automatically opening the PR with the correct title. I always spend time looking for "what is the correct format" ๐Ÿ™ˆ

You might want to add a line or two about this script in the scritpts/README.md since it's the reference about how to do the release

alexfauquette avatar Jun 12 '25 09:06 alexfauquette

Why we have a bash and node versions of the same script? ๐Ÿ˜†

This was my first attempt ... in fact I will probably go back to it, but node scripts cannot handle git commands and lerna scripts very well, so this does seem to be the better option for now.

michelengelen avatar Jun 12 '25 12:06 michelengelen

@JCQuintas in a second iteration on this i will most likely separate this monolithic script into several smaller ones (maybe using node scripts ๐Ÿคท๐Ÿผ), but for now this should do and be tested ... agree?

michelengelen avatar Jun 12 '25 14:06 michelengelen

@JCQuintas in a second iteration on this i will most likely separate this monolithic script into several smaller ones (maybe using node scripts ๐Ÿคท๐Ÿผ), but for now this should do and be tested ... agree?

Im ok with that

JCQuintas avatar Jun 12 '25 14:06 JCQuintas

@JCQuintas in a second iteration on this i will most likely separate this monolithic script into several smaller ones (maybe using node scripts ๐Ÿคท๐Ÿผ), but for now this should do and be tested ... agree?

Personally, I disagree. It would be quite a waste to battle test this bash just to replace it with something else, that will never happen. An llm can refactor this for you into JavaScript in a heartbeat. Why not do it from the get go, so we can test on a proper version? a single JavaScript file is perfectly fine and much more comprehensible for more maintainers in this org than bash soup. You can call git and lerna quite conveniently with execa. e.g. see https://github.com/mui/mui-public/blob/c7891d8b9b5c4b5f2565f3833d8e4f6140b96017/scripts/publish.mjs#L219

Janpot avatar Jun 12 '25 16:06 Janpot

@JCQuintas in a second iteration on this i will most likely separate this monolithic script into several smaller ones (maybe using node scripts ๐Ÿคท๐Ÿผ), but for now this should do and be tested ... agree?

Personally, I disagree. It would be quite a waste to battle test this bash just to replace it with something else, that will never happen. An llm can refactor this for you into JavaScript in a heartbeat. Why not do it from the get go, so we can test on a proper version? a single JavaScript file is perfectly fine and much more comprehensible for more maintainers in this org than bash soup. You can call git and lerna quite conveniently with execa. e.g. see https://github.com/mui/mui-public/blob/c7891d8b9b5c4b5f2565f3833d8e4f6140b96017/scripts/publish.mjs#L219

All right... let me try to rewrite this in JS tomorrow. I did not know about execa before (although I searched for execution in node scripts ๐Ÿซฃ).

michelengelen avatar Jun 12 '25 17:06 michelengelen

@Janpot I must say I am fairly impressed by the rewrite the AI did. ๐Ÿคฏ

michelengelen avatar Jun 13 '25 07:06 michelengelen

Great initiative. ๐Ÿ‘ I haven't tried running it, just did a first review pass and I've got a clarification to make. Am I missing something, or this won't allow independent version releases (i.e. releasing [email protected], while the repo (or other package) version is 8.3.3)? ๐Ÿค”

It should allow for that. The lerna script still runs like before. The only difference ere is that i rewrote the changelog generation into grabbing the version from the package json of the products.

michelengelen avatar Jun 13 '25 08:06 michelengelen

@Janpot I must say I am fairly impressed by the rewrite the AI did. ๐Ÿคฏ

beware, they still hallucinate ๐Ÿ˜„

Janpot avatar Jun 13 '25 16:06 Janpot

@Janpot I must say I am fairly impressed by the rewrite the AI did. ๐Ÿคฏ

beware, they still hallucinate ๐Ÿ˜„

I know! In this instance it went very well! ๐Ÿคฃ

michelengelen avatar Jun 13 '25 17:06 michelengelen

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Jun 15 '25 05:06 github-actions[bot]

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Jun 17 '25 08:06 github-actions[bot]

@cherniavskii I added a step to fetch the fork remote name

michelengelen avatar Jun 19 '25 16:06 michelengelen

Cherry-pick PRs will be created targeting branches: v6.x, v7.x

github-actions[bot] avatar Jun 19 '25 16:06 github-actions[bot]