feat(root): Changeset for automatic bump and much easier release on canary
#1282
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
When we get something merged, be it canary or main, we always have to follow a few
set-in-stone steps that are very error-prone in every part of it, mostly painful because we
can't undo any mistakes we make when bumping or publishing versions.
If we think about the step-by-step to release and the ways we can fail:
Besides these issues, we also have that it can take longer for someone to review the
PR for bumping and the PR for the changelog which can cause a lot of frustration
to users if we take too long to release a certain fix or feature that may be really needed.
How does this PR fix this?
This PR is proposing we do it using both changesets, a github action,
and their GitHub bot.
The proposed flow would be something like:
pnpm release
pnpm build && pnpm changeset publish
CHANGELOG.md
into our docs's changelog and open the PRIn none of these steps, we would not have something fail here as the changeset would take care
of bumping all packages, and then the person who intends to release can review the bump themselves
which I don't think would be dangerous or harmful as the PR is not created by them,
and if they do make changes to it they won't be able to merge themselves.
This also has a few extra benefits, but most of all, it would improve our changelog.
It would do so because of a reason that gets clearer if we look at the complete
flow from task to release which would be something like:
easier to be caught in comparison to the other issues
canary
creates a new PR bumping the versionspnpm release
pnpm build && pnpm changeset publish
CHANGELOG.md
into our docs's changelog and open the PRThis is where mostly this is different from what we had from December 2022 because the changesets
would be done in the PRs themselves. This PR adds it in a bit of a safer way as well by just adding this
to be ran on the
canary
branch so that we can test this workflow out and verify it is good enough before actually goingwith it into
main
.If we do get this PR merged, we would need to add the GitHub bot as well which I can't do from a PR AFAIK.