Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 1.76 KB

RELEASE.md

File metadata and controls

34 lines (24 loc) · 1.76 KB

How to release a new version

Keep a changelog

As you add features or fix bugs, keep the CHANGELOG.md file up to date. Add any new information in the Unreleased section.

Do not put the new information in a new section with your future version number. The release script will take care of that.

If you have pending changes to the changelog file, no need to commit it, the release script will include these changes.

Release a new version

  • Ensure the CHANGELOG.md file has the new content in the Unreleased section, these will become the release notes
  • Run yarn release to create a new version with the correct release type: yarn release --major, yarn release --minor or yarn release --patch
  • If the operation is a success, a new commit and tag will be created and pushed for the new version

That's it. A GitHub action will make the GitHub release and publish automatically.

Release process information

The release process is automated using a release script then a GitHub action:

  • The yarn release script will:
    • Move content in the changelog from Unreleased to a new section, then add the file to the future commit
    • Use yarn version to bump the version in package.json, create a release commit and tag
    • Use git push --follow-tags to push the commit
  • A release GitHub action will make the release and publish the package:
    • The action is triggered if a push includes a tag that starts as v*
    • It runs all tests before the release
    • It creates a GitHub release, settings the release notes based on the changelog
    • It publishes the package to both npm and GitHub Packages

You can check the release script in the scripts/release.js file and the GitHub action in the .github/workflows/release.yml file to see how they work.