-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
[Tracking] Use Changesets to manage releases #22242
Comments
Progress updateSummary🎉
🤔
TasksPrototype repoWe've created a prototype repo where we're experimenting with all this stuff at https://github.com/storybookjs/monorepo-release-tooling-prototype . We forked the SB monorepo and renamed all packages from It works on the Changesets CLIEverything is up and running, correctly creating versions, releases and publishing. 🎉 Changesets ActionAlso works, creating correct "Version Packages" PRs, and when merged, releases new versions. 🎉 PrereleasesI've tried out a workflow that supports our current branching with Starting a prereleaseWe'll do this when we release eg.
Promoting from one prerelease to another - eg.
|
I've investigated how to lock down the release pipeline, to ensure no bad actors can release anything without approval from core. Here's the solution: By experimenting with GitHub Environment protection and some clever hacks, I've managed to make it work in a very secure way.
This means that:
🎉🔒 |
Changelogs and GitHub ReleasesI've been exploring Changesets' ability to format changelogs and GitHub releases. Our "one release to rule them all (91 packages)" approach to releasing doesn't work very well with Changesets in this regard. ChangelogChangesets only supports writing a changelog per package, in the package's directory. I don't think that's very useful to us given our versioning strategy - but it's also not totally out of the question. It would make it easier for us to see which changes and versions affected which packages, but it would make it harder for users to get a clear overview of what is changing between each Storybook version. Changesets do support basic customization of the changelog, but only on a per-line basis, and not how or where the changelog is written. There is currently a PR open changesets/changesets#1062 to support producing a single changelog for a group of packages, and because the author (thanks @VirtuaBoza!) published it on npm I've been playing around with it. I think it does an okay job of creating a nice output, as seen here: https://github.com/storybookjs/monorepo-release-tooling-prototype/blob/new-next/code/CHANGELOG.md
Point 2 makes me uncomfortable, I don't think we want that as part of our main release pipeline. It is a promising PR however. That leaves us with two options:
I'm leaning towards option 2 - I'm hopeful that we can leverage Changesets' internals (they are neatly published as separate packages) to generate changelogs based on changesets, maybe using our current release-script as a starting point. GitHub releasesThere is no way to make Changesets generate a single GutHub release, it will generate separate releases for each package published. As you can see here, that is not an option for us at all: https://github.com/storybookjs/monorepo-release-tooling-prototype/releases We need to disable Changesets' GitHub release generation (it's an option in the GitHub Action), and generate our own as part of the process. Again, I'm hopeful we can piggy bag off of the changelog generated above, and just add a subset of that to a GitHub release. Is Changesets still the best option?These obstacles here makes it valid to ask ourselves, if Changesets is still the best tool for us, given our rather unique monorepo setup. We're effectively:
So we're left with:
There is a universe where we abandon the idea of Changesets now and then roll our own release tool based on the existing scripts - or find another tool. I personally still think Changesets is the right setup for us given the gains listed above, but I'm very open to have that discussion. I'm not married to a tool, I want the best solution for us. |
We've concluded that trying to integrate Changesets into our pipeline isn't feasible at the moment, for a few key reasons:
In summary, we would need to disable most of Changesets core functionality to make it work for us, which would mean that we wouldn't gain as much from using it. I'm in the process of rethinking the release tooling proposal, merging concepts from Changesets (like release PRs) with our existing process and scripts. Closing this tracking issue, will update the RFC and create a new Tracking issue. |
Superseded by #22532 |
Tracking progress for the implementation of #22182
Main Deliverables
Migrating prototype to monorepo
The text was updated successfully, but these errors were encountered: