dev-docs/lit-release-process.md
Audience: Lit core contributors.
The end result of this document is a release of all unreleased changes on the main branch for all packages in the Lit monorepo.
Note Before releasing, ensure the main branch has been imported and tested within Google. Because Google has an unversioned monorepo, this provides confidence we are not releasing unexpected breaking changes. This can be checked by pinging the general development channel on our Discord.
Warning If a Version Packages pull request has not been created, an error may have occurred in the GitHub action run. Look at the full logs for root cause.
Possible failures previously encountered: A malformed changest file referencing a package name that doesn't exist. The fix was to commit the fixed changeset file to main, and re-run the release process on that new commit with the fixed changeset.
Request code reviews from members of the team familiar with the packages that will be released.
lit core libraries such as lit-html, lit-element, and @lit/reactive-element should be relected in the umbrella lit package.main branch and re-run the release process.Once "Version packages" is approved, (provided no new changesets were merged to main in the meantime), squash and merge.
Warning If a commit to
mainoccurred while the "Version Packages" PR was open and a new changeset was created then do not squash and merge. Instead re-run version packages to update the PR with the most recent changes. Otherwise the following steps will not publish a release and will instead create another "Version Packages" PR integrating the new changeset file.A publish only occurs when there are no unreleased changeset files on
main.
tests-local to pass. Then repeat steps 1. and 2. from above, where this time the result of approving the "Release / Release" GitHub Action is publishing a new NPM version release and GitHub release.If the release contains new API documentation then lit.dev will need to be updated.
npm run build. When the build succeeds pages.json and/or symbols.json will contain the new documentation. If these files have not been updated then no API docs have changed.Announce the new release on Twitter and Discord!
A release image is automatically generated when the "Version Packages" pull request is created by the "Generate Release Image" action.
Use this option to create multiple images or want to render out some custom markdown.
Note Usage of
release-imagetool can be checked by invoking the command with no arguments.
Run each of the commands below from the lit monorepo root. Each generates a release.png.
cd packages/internal-scripts && npm run build && npx release-image \
-f ../lit-html/CHANGELOG.md -v 2.0.1 \
-f ../lit-html/CHANGELOG.md -v 2.0.0
Given the following markdown file:
<!-- release.md -->
# Custom Release Notes
Custom content in **here**.
Executing cd packages/internal-scripts && npm run build && npx release-image -m release.md gives: