-
Notifications
You must be signed in to change notification settings - Fork 28
Description
for traceabiity.
Instructions for Copilot
In this repo, currently, everytime a PR is merged into master, the publish-preview (example run) workflow gets triggered that publishes canary releases of each of the packages that had some changes since the last release.
Currently, we just publish the packages from this repo but we don't have a way to know what PR(s) were merged for a particular package to generate the changelog. This will be helpful to know what changes are part of a particular release.
We need to accomplish that through a PR where we generate the changelog by using the Github rest API (via Octokit rest). To know which PR belongs to which package, look for the label scope: <package-name> in the PR. This way, generate the changelog for each package (that needs to be published) and after the packages are published, create a new Github release with the same changelog for each package. The release name should be of the format <npm-package-name>@<version>. After publishing the release, also create and push a new Github tag with the same name.
Context:
Most of the canary publish logic is in packages/code-infra/src/cli/cmdPublishCanary.mjs file.
Add this new feature behind a cli flag so that it is easy to not use it if there are any issues. Update the workflow file's .github/workflows/publish.yml publish-preview job to use this new flag.