When the "Version Packages" PR is merged, the created commit is the
format of "Version Packages (#number)". Therefore, the
check-is-release.js script won't match the current regex. Also, I
modified the workflows that use the `check-is-release.js` to consider
the new release as a release workflow as well.
Best to be reviewed with "Hide whitespace".
This PR added release candidate handling and used a switch case to
ensure the correct release type was given.
---------
Co-authored-by: Sebastian "Sebbie" Silbermann <sebastian.silbermann@vercel.com>
Co-authored-by: Zack Tanner <1939140+ztanner@users.noreply.github.com>
This PR uses `changesets/action` to handle the canary release. Since the
action creates a Version Packages PR by default, I added a GH Action
that checks if the PR is released from the correct release workflow. It
triple-verifies via the user login (`vercel-release-bot`), PR title
(`Version Packages (canary)`), and a label (`created-by: CI`) to ensure
the opened PR is not trying to spoof.
After the validation, the PR bypasses required checks, is merged into
the canary branch, and proceeds with the rest of the release process.
### Testing Plan
Try running `ci:version` and `ci:publish` locally, and handle the
release type via env `RELEASE_TYPE`.
Confirmed the CI force merge on
https://github.com/devjiwonchoi/lab-releases/pull/13
---------
Co-authored-by: Sebastian "Sebbie" Silbermann <sebastian.silbermann@vercel.com>