This guide is about releasing integrations and has nothing to do with Meilisearch releases that are handled during the pre-release week.
⚠️ Integration releases are public and are certainly among our most consulted contents with the READMEs.
Indeed, users reading the release changelogs are mostly users wanting to upgrade their dependencies, so they might consult the release description really carefully.The Integration team should keep this in mind during the release process.
First of all, you need to check the release would include user-oriented changes. A release is not always needed after merging PRs.
Don't do a release without any usage purpose, for example for the update of a text file/test/CI or for an internal refactor.
📢 A release should be done only when there are changes concerning the code usage.
Follow the steps in the Release Process
section in the CONTRIBUTING.md
file of the repository carefully. These steps should be precise; if it's not, please open an issue on the related repository.
During these release steps, depending on the integration, releasing is done via the GitHub interface. The release comes with a description containing the changelogs.
The Release Drafter tool, integrated into most repositories, provides a release description structure containing the changelogs. Please add additional content in the release description to ensure these changelogs are:
- accurate: describe what changed, with links to the PRs, and the consequences of the changes if needed. Also, check all the breaking changes are in the
Breaking Changes
section. - user-friendly: add documentation links if necessary.
- user-oriented: do not add changelogs that do not impact the code usage (e.g., internal refacto, documentation, tests, CI modifications).
- contributor-friendly: thank all the contributors, especially the ones who don't appear on the changelogs because they helped on the tests or the documentation.
Also, when writing the final changelogs, you might notice some inconsistencies, e.g., a PR that should have been identified as a breaking change or a PR that should not appear in the changelogs: in this case, please, do not update the release description manually. Instead:
- Go to the related PR.
- Add the missing label (
breaking-change
,new-feature
orskip-changelog
, see guide). - Re-run the last
Release Drafter
job in theActions
tab of the repository.
💡 How to re-run the "Release Drafter" job?
- Go to the
Action
tab.- Click on the left sidebar
Release Drafter
.- Select the latest action.
- At the top right part of the screen click on
Re-run all jobs
.
This keeps consistency between the PRs history and the release changelogs.
In some repositories, GitHub Actions are triggered after a tag creation following the release publication. It might happen that one of these actions failed because pre-requisites are not met (i.e., the new version in the correct file). Don't worry; it is fixable! These are the steps:
- Delete the release: go to the "Releases" section on GitHub, then click on the latest release and then on "Delete" in the upper right corner.
- Delete the tag (
v0.X.Y
): go to the "Releases" section on GitHub, then click on the "Tags" section, go to the latest tag, click on "Delete" in the upper right corner. - Merge the PR with the missing pre-requisites (i.e., adding the current version in the correct file).
- Once the merge completes, a new release draft is created. You can now publish it!
Failure situation example
I release meilisearch-js@v0.2.0
but I forgot to update the version in my package.json
. On release, the publish to npm
GitHub Action is triggered. A test is done to check if the version in package.json
is the same as the tag
created by the GitHub release. In this case, v0.1.0
in my package.json and v0.2.0
as a tag; thus, the GitHub Action stops, and my package is not published to npm.
The situation is as follows: meilisearch-js@v0.2.0
is released on GitHub, the tag v0.2.0
is created, but it is not published on npm which is still at v0.1.0
.
To solve the situation, I delete the release and the tag on GitHub. I merge the PR with the right version in package.json
. I go back to the release screen, and I publish the newly created release draft.
It might happen that the release worked but the published package on the package manager is broken (completely unusable). In this specific case, some steps must be followed.
If the package was published recently:
- Delete/deprecate the package in the package manager (ex:
npm deprecate meilisearch@0.1.0 "Missing files breaks the package"
). - Follow step one and two of the previous section What to do when Failing a release.
- Fix the package.
- Increase the patch version (ex: 0.1.0 becomes 0.1.1).
- Once the merge is completed, a new release draft is created. You can now publish it!
If the package was not published recently:
- Deprecate the package in the package manager.
- Write in the body of the broken release that this version is deprecated.
- Fix the package.
- Increase the patch version (ex: 0.1.0 becomes 0.1.1).
- Once the merge completes, a new release draft is created. You can now publish it!
For some integrations, we need to release a beta version of the integration before releasing the official one. For instance, during the Meilisearch pre-release, we often need to release a beta version of meilisearch-js to make the mini-dashboard) work with the future release of Meilisearch.
Please, follow the instructions detailed in the CONTRIBUTING.md of the repository to release a beta version.