Releasing a new version
Releasing is mostly handled by the CI:
- The version on GitHub is published automatically, including the description with the change log which is taken from the documentation.
- A PR is created automatically on the Winget repository to update to the new version.
Releases are usually made directly from the main branch. For hot-fixes the process is the same but with a different branch, consult the Branching strategy for more information.
Using the release CLI
pnpm chore:release walks through the whole process interactively:
- Checks that the branch is not behind
originand that every changelog entry is valid. - Proposes the version from the changelog entries: a major release (
0.106.1→0.107.0) when they contain a breaking change, a highlight, a compatibility change or a new feature, when the sync or database version changed, or when there are many of them; otherwise a minor one (0.106.1→0.106.2). A release note already drafted for a newer version takes precedence. - Drafts the release note if there is none, registers it in the Release Notes folder and warns about the changelog entries that changed after it. Once the note is final, it consumes the entries and commits the note.
- Sets the version in every
package.json, commits it and runs the release pre-flight check. - Tags the commit and pushes the branch and the tag, which starts the release workflow.
- Merges the tag into the
stablebranch and pushes it (not for pre-releases).
It asks before every commit and push, and each step skips what is already done, so a run that stopped halfway can be started again. pnpm chore:release --dry-run asks the same questions but prints the commands instead of running them.
Manual process
The process is as follows:
- Edit the Documentation to add a corresponding entry in the Release notes section.
- In the root
package.json, setversionto the new version to be released. - Run
chore:update-versionto automatically update the version of the rest of thepackage.jsonfiles. - Run
pnpm ito update the package lock as well. - Commit the changes to the
package.jsonfiles and thepackage-lock.json. The commit message is usuallychore(release): prepare for v1.2.3. - Tag the newly created commit:
git tag v1.2.3 - Push the commit and the newly created tag:
git push; git push --tags. - Wait for the CI to finish.
- When the release is automatically created in GitHub, download it to make sure it works OK.