This repo makes use of the changesets package to manage changelog generation, and publishing, and pushing appropriate github tags.
"A changeset is an intent to release a set of packages at particular semver bump types with a summary of the changes made."
Read: An introduction to using changesets.
To see what changes are going into the next release, run:
yarn changeset info
To test what the changelog will look like beforehand (locally), you can run:
export GITHUB_TOKEN="???"
yarn changeset version
(see https://github.com/settings/tokens)
Once you have tested your changes and they have been approved for a new release, merge the changeset pull request into master.
- As PRs are merged into master, we use a special GitHub action to updates the package versions and changelogs, automatically creating a
Versions Packages
PR. - Once we're ready to publish a new release, we can look at the
Version Packages
PR. If we like the way the Changelog looks, we can merge it in right there. If we want to edit the generated changelog, we can edit the changelog directly on that PR and then merge. If we aren't ready to merge things in and we want to add more detail to a changeset, we can always edit the changeset in .changesets/* and merge those in. Changesets are just text files, and are meant to be human-editable.
Creating a Changelog and releasse is handled for us by the Release GitHub Action.
As PRs are opened against master
, this action will open and update a PR which generates the appropriate CHANGELOG.md
entries and package.json
version bumps.
The generated PR has the title "Version Packages"
Once ready for a release, approve the "Version Packages" PR and merge it into master
.
Feel free to edit the "Version Packages" PR. If you see a merge conflict in Version Packages, that PR can be closed and a new PR should automatically re-open.
- Merge the
Version Packages
PR.
Information is in the @changesets automation instructions
Check out the @changesets automation instructions
- run prepare scripts
- publish all packages to npm
- pushes tags to repo
- triggers a github release on CI (via tags)
- triggers a CDN release
export GITHUB_TOKEN="???" ## changelog generator requirement (https://github.com/settings/tokens)
yarn update-versions-and-changelogs && ## bump + generate changelog + delete old changesets
git add . && # add generated artifacts
git commit -m "v1.X.X" &&
yarn release
Feature branches are automatically released under:
http://cdn.segment.com/analytics-next/br/<branch>/<latest|sha>/standalone.js.gz