Skip to content

Commit e8e25ab

Browse files
docs: add release process (#239)
* docs: add release process * Apply suggestions from code review Co-authored-by: Clément Vannicatte <[email protected]> * docs: apply feedback * docs: remove submodule mention Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 94e3166 commit e8e25ab

File tree

4 files changed

+46
-0
lines changed

4 files changed

+46
-0
lines changed

.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# See ./website/docs/releaseProcess.md for more information.
2+
3+
GITHUB_TOKEN=

website/docs/introduction.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ To contribute to the repository, make sure to take a look at our guidelines and
1313
- [Setup the repository tooling](/docs/setupRepository): to install our tooling.
1414
- [Add a new client](/docs/addNewClient): to add a new client spec to generate.
1515
- [Support a new language](/docs/addNewLanguage): to add a new supported language to the API clients.
16+
- [Pull-request](/docs/pullRequest): to see how to send pull-requests.
17+
- [Release process](/docs/releaseProcess): to see how to release API clients.
1618

1719
CLI commands can be found at [CLI > specs commands](/docs/specsCommands) and [CLI > generation commands](/docs/generationCommands)
1820

website/docs/releaseProcess.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
title: Release process
3+
---
4+
5+
# Release process
6+
7+
## Part 1
8+
9+
You need a `GITHUB_TOKEN` in your [`.env`](https://github.com/algolia/api-clients-automation/blob/main/.env.example) file at the root of the repository. You can generate one from the [personal access token page](https://github.com/settings/tokens/new) with `Repo (Full control of private repositories)` scope.
10+
11+
```
12+
GITHUB_TOKEN=<YOUR-PERSONAL-ACCESS-TOKEN>
13+
```
14+
15+
Once setup, you can run
16+
17+
```bash
18+
yarn release
19+
```
20+
21+
It will create [a release issue](https://github.com/algolia/api-clients-automation/issues/220).
22+
23+
## Part 2
24+
25+
You need to review the release issue, in two parts:
26+
27+
1. version changes
28+
2. CHANGELOGs
29+
30+
Any changes applied in the issue will be taken into account by the release process.
31+
32+
Clicking "Approved" to approve the release, and closing it, will trigger the [Part 3](#part-3).
33+
34+
## Part 3
35+
36+
The [GitHub action release](https://github.com/algolia/api-clients-automation/blob/main/.github/workflows/process-release.yml) is triggered. It generates clients and push changes to each language repository on their `next` branch.
37+
38+
This Part 3 runs conditionally according to what has been done in Part 2. Under "Version Changes" section of the release issue, if a language is checked, this Part 3 will creates a commit like `chore: release v<NEXT-VERSION>` in each repository. If it is not checked, it will create a commit like `chore: update repo <DATE-STAMP>`.
39+
40+
Each language repository should have their own release process, and should run only when the latest commit starts with `chore: release`. By doing so, we have a way to just update the repository, for example READMEs, without having to release.

website/sidebars.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const sidebars = {
2020
'addNewClient',
2121
'addNewLanguage',
2222
'pullRequest',
23+
'releaseProcess',
2324
],
2425
},
2526
{

0 commit comments

Comments
 (0)