You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
898: Add beta release process r=bidoubiwa a=bidoubiwa
This repository is able to create mutiple types of beta:
- A normal beta for the package. Example, I add a feature in instant-meilisearch and would like to publish a beta on npm to try it out.
- A beta implementing the changes of a future release of Meilisearch. [Example](#881)
- A beta of a specific prototype of Meilisearch. [Example](#817)
Each of these beta must run against a specific [version of Meilisearch](https://github.com/meilisearch/meilisearch/).
- the normal beta has to run against the latest release of Meilisearch
- the pre-release beta against the latest rc of Meilisearch
- the prototype beta against the meilisearch docker image of the prototype
This PR introduces the new process to make this as simple as possible. To be able to redirect the PR's to the correct tests a new formating is suggested on the branch name. For consistency, a new formating is suggested on the package version.
The `check-tag-version` script ensures that if the version is not a `vX.X.X` it should be a pre-release.
the `prototype-docker-version` parse the branch name to fetch the correct image on the docker API.
Co-authored-by: Charlotte Vermandel <[email protected]>
# This script is ran whenever a PR is made to implement a Meilisearch prototype.
4
+
# For example if Meilisearch creates a prototype for radioactive search, the SDK may implement a way to try out the radioactive search.
5
+
# Nonetheless, the tests of this implentation should run against the prototype and not the latest release of Meilisearch.
6
+
# To be able to do so, Meilisearch creates a docker image with the changes.
7
+
# The purpose of this script is to find the correct docker image containing the changes.
8
+
# For example,
9
+
# The radioactive search docker image is named `v0.30.0-radioactive-search.beta.0`
10
+
# our branch is named `prototype/radioactive-search.0`
11
+
# Using the branch name, this script is going to retrieve the name of the docker image.
12
+
13
+
# See https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables for references on GITHUB_REF_NAME
14
+
prototype_branch=$1# $GITHUB_REF_NAME
15
+
prototype_branch=$(echo $prototype_branch| sed -r 's/prototype-beta\///')# remove pre-prending prototype-beta/
16
+
prototype_name=$(echo $prototype_branch| sed -r 's/-beta//')# remove appended -beta
17
+
18
+
docker_image=$(curl "https://hub.docker.com/v2/repositories/getmeili/meilisearch/tags?&page_size=100"| jq | grep "$prototype_name"| head -1)
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+29-29Lines changed: 29 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -131,6 +131,7 @@ _[Read more about this](https://github.com/meilisearch/integration-guides/blob/m
131
131
132
132
⚠️ Before doing anything, make sure you got through the guide about [Releasing an Integration](https://github.com/meilisearch/integration-guides/blob/main/resources/integration-release.md).
133
133
134
+
#### Version update
134
135
Make a PR modifying the following files with the right version:
135
136
136
137
[`package.json`](/package.json):
@@ -143,58 +144,57 @@ Make a PR modifying the following files with the right version:
143
144
exportconstPACKAGE_VERSION='X.X.X'
144
145
```
145
146
147
+
#### Github publish
146
148
Once the changes are merged on `main`, you can publish the current draft release via the [GitHub interface](https://github.com/meilisearch/instant-meilisearch/releases): on this page, click on `Edit` (related to the draft release) > update the description (be sure you apply [these recommendations](https://github.com/meilisearch/integration-guides/blob/main/resources/integration-release.md#writting-the-release-description)) > when you are ready, click on `Publish release`.
147
149
148
150
GitHub Actions will be triggered and push the package to [npm](https://www.npmjs.com/package/@meilisearch/instant-meilisearch).
149
151
152
+
#### Codesandbox update
150
153
Once the version is available on npm, please update the instant-meilisearch version used in the different Code-Sandboxes we provide:
If you don't have the access to do it, please request it internally.
157
161
158
162
#### Release a `beta` Version
159
163
160
-
Here are the steps to release a beta version of this package:
164
+
This package is able to create multiple types of betas:
165
+
- A standard package beta, working on the latest version of Meilisearch.
166
+
- A beta implementing the changes of a rc version of Meilisearch.
167
+
- A beta implementing a specific feature `prototype` of Meilisearch.
161
168
162
-
- Create a new branch containing the "beta" changes with the following format `xxx-beta` where `xxx` explains the context.
169
+
Here are the steps to release a beta version of this package depending on its type:
163
170
164
-
For example:
165
-
-When implementing a beta feature, create a branch `my-feature-beta` where you implement the feature.
166
-
```bash
167
-
git checkout -b my-feature-beta
168
-
```
169
-
- During the Meilisearch pre-release, create a branch originating from `bump-meilisearch-v*.*.*` named `bump-meilisearch-v*.*.*-beta`. <br>
170
-
`v*.*.*` is the next version of the package, NOT the version of Meilisearch!
171
+
1. Create a new branch containing the changes with the correct name format following these rules:
172
+
-`package beta`: create a branch `beta/xx-xx` with the context of your beta.
173
+
Example: `beta/refactor`.
174
+
- Meilisearch `pre-release beta`: create a branch originating from `bump-meilisearch-v*.*.*` named `pre-release-beta/v*.*.*`. <br>
175
+
Example: `pre-release-beta/v0.30.0`
176
+
- Meilisearch `prototype beta`: create a branch `prototype-beta/xx-xx`. Where `xxx` has the same name as the docker image containing the prototype.
177
+
Example: If the [docker image](https://hub.docker.com/r/getmeili/meilisearch/tags) is named: `v0.29.0-pagination.beta.2`, the branch should be named: `prototype-beta/pagination`
171
178
172
-
```bash
173
-
git checkout bump-meilisearch-v*.*.*
174
-
git pull origin bump-meilisearch-v*.*.*
175
-
git checkout -b bump-meilisearch-v*.*.*-beta
176
-
```
179
+
2.[Update the version](#version-update) following the correct format (X are numbers):
180
+
- package and prototype beta: `X.X.X-***.X`
181
+
example: `0.2.0-new-feature.0`
182
+
- pre-release beta: `X.X.X-vX.X.X-pre-release.X`
183
+
example: `0.2.0-v0.30.0-pre-release.0`
177
184
178
-
- Change the version in [`package.json`](/package.json) and [`src/package-version`](/src/package-version.ts) with `*.*.*-xxx-beta.0` and commit it to the `v*.*.*-beta` branch.
179
185
180
-
- Go to the [GitHub interface for releasing](https://github.com/meilisearch/instant-meilisearch/releases): on this page, click on `Draft a new release`.
186
+
3. Commit and push your code to the newly created branch (step 1).
181
187
182
-
- Create a GitHub pre-release:
188
+
4. Go to the [GitHub interface for releasing](https://github.com/meilisearch/instant-meilisearch/releases): on this page, click on `Draft a new release`.
189
+
190
+
5. Create a GitHub pre-release:
183
191
- Fill the description with the detailed changelogs
184
-
- Fill the title with `vX.X.X-beta.0`
185
-
- Fill the tag with `vX.X.X-beta.0`
186
-
- ⚠️ Select the `vX.X.X-beta.0` branch and NOT `main`
192
+
- Fill the title with the version defined on step `2`, appened with a `v`. Ex: `v0.1.0`
193
+
- Fill the tag with the same name as the title
194
+
- ⚠️ Select the branch created on step `1` and NOT `main`
187
195
- ⚠️ Click on the "This is a pre-release" checkbox
188
196
- Click on "Publish release"
189
197
190
-
GitHub Actions will be triggered and push the beta version to [npm](https://www.npmjs.com/package/@meilisearch/instant-meilisearch).
191
-
192
-
💡 If you need to release a new beta for the same version (i.e. `vX.X.X-beta.1`):
193
-
- merge the change into `bump-meilisearch-v*.*.*`
194
-
- rebase the `vX.X.X-beta.0` branch
195
-
- change the version name in [`package.json`](/package.json) and [`src/package-version`](/src/package-version.ts)
196
-
- creata a pre-release via the GitHub interface
197
-
198
198
<hr>
199
199
200
200
Thank you again for reading this through. We can not wait to begin to work with you if you make your way through this contributing guide ❤️
0 commit comments