Closed aleclarson closed 3 weeks ago
Alternatively, publish patches immediately upon merging. 🤔
Another question is: what if an unreleased feat:
commit exists in the main branch? The workflow could try rebasing without the feat commits, and if the rebase doesn't encounter merge conflicts, it can publish a patch.
I like the idea; in the current flow, we’re only handling major and minor releases, so this could be a way to introduce patch releases in between.
However, if we only use the main branch, this could lead to some issues.
Imagine someone adds a new function xyz
, we merge it into main, which goes to @beta
. Then, someone opens a PR with a fix
for this new xyz
function, addressing a type issue. Although this PR is labeled as a fix
, it shouldn’t be merged immediately since it’s directly tied to a feat
PR still in beta.
We could:
feat
, then pause.next
branch or something similar to separate the flows (though it could get a bit confusing).By the way, have you decided on the frequency for minor releases? Will it be monthly, every set period, or after a certain number of new features?
Here's how I've got it set up now (as of today):
next
branchmain
until the day they are officially released, but they can be labeled with prerelease
to be copied into either the beta
(for feature PRs) or next
(for breaking changes) branch, which will be published immediately upon being pushed to, using either --tag beta
or --tag next
for NPM dist tag.Before a PR is copied into the beta
or next
branch, the branch is rebased onto main
(i.e. it rebuilds itself on top of main
). Note that main
is not affected by this process. The rebasing is automatic (see the ./scripts/prerelease/src/prerelease.ts
module).
If the rebase fails, the PR cannot be pre-released until the target branch is manually rebased.
Even if a PR is labeled with prerelease
, it won't be pre-released until it:
.github/CODEOWNERS
fileBy the way, have you decided on the frequency for minor releases? Will it be monthly, every set period, or after a certain number of new features?
I hope to release minor versions once a month, but it's not a strict schedule. I think the automatic beta releases are a fine workaround here.
GitHub releases for patches are now automatically created 🎉
Same for pre-releases, but those are created in the radashi-canary repository.
During nightly
publish-beta
workflow, skip the beta release if onlyfix:
commits exist and publish a patch instead.