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

[RFC] Updates to the release process

Open Janpot opened this issue 3 years ago • 4 comments

Proposed solution 🟢

Proposing some updates to the release scripts to reduce manual action and human error:

  • Step 1: Prepare the release. Combines the following steps into a single command:

    1. verify whether there's a valid github token present.

    2. yarn release:version

      • prompt for a version, then update all relevant packages.
    3. yarn release:changelog but with the following changes:

      • starts by generating the changelog and displaying it in the CLI.
      • prompt for highlights.
      • automatically insert the version + highlights + changelog into the CHANGELOG.md.
    4. ask whether it should open a PR, or whether you want to review and PR manualy

      • if yes => open PR with the version as title
  • Step 2: Publish the release. Requires the previous PR to be merged. Combines the following steps:

    1. Everything from yarn release:docker
    2. Extracts the relevant part of this version from CHANGELOG.md and creates a draft release with it on github through the API.

Janpot avatar Oct 12 '22 18:10 Janpot

Sounds good! The prompt for highlights I would still prefer to do it in VS Code than in the CLI, should be fine as long as it's easily skipped.

apedroferreira avatar Oct 13 '22 14:10 apedroferreira

Sounds good! The prompt for highlights I would still prefer to do it in VS Code than in the CLI, should be fine as long as it's easily skipped.

Had exactly that use case in mind: You'd just leave it empty and skip the git PR creation.

An alternative would be to open your editor with the changelog preloaded and continue the CLI once it's closed again

Janpot avatar Oct 13 '22 14:10 Janpot

An alternative would be to open your editor with the changelog preloaded and continue the CLI once it's closed again

That should also work. Anyway it would always be possible to alter the changelog and commit some more changes to the PR too.

apedroferreira avatar Oct 13 '22 14:10 apedroferreira

I've just checked every release that we had so far, seems that we have either 1 or 2 sentences as highlight. So IMO defaulting to prompt - allowing to enter those sentences and moving on should be default. I'd not overload the logic with custom handling since (as @apedroferreira already mentioned) we could always open up IDE and commit more changes if really needed manually

bytasv avatar Oct 13 '22 14:10 bytasv