chromaui / chromatic-e2e

Archive end-to-end tests to be replayed in Storybook and Chromatic
MIT License
21 stars 4 forks source link

Add changesets for versioning and releasing #62

Closed tevanoff closed 8 months ago

tevanoff commented 8 months ago

Issue: AP-4039

What Changed

Introduces changesets for versioning and releasing.

There are two new workflow files. canary-release.yml will handle cutting canary releases on branches, and release.yml will handle the real release when branches with a changeset are merged to main. The main release job has two phases. When merging a branch to main, the release flow will open a new PR with the package.json version bumps and changelog updates. When that PR is merged, then the packages will be published to npm.

Both workflows require the base test workflow to complete successfully.

Documentation about adding changesets and the release flow will come in a follow-up PR.

How to test

Since these use workflow_run to trigger the workflow, the files need to be on the main branch to work, making it a bit hard to test. Mainly verify the logic in the workflow files.

tevanoff commented 8 months ago

Nice work!

One question -- will this secondary-PR (the one with the actual release and changeset changes) be automatically merged? It'd be nice if we don't have to remember to go back and review a second PR after merging the first one.

@skitterm thanks! It will not be auto-merged yet, but we could always add that down the line.