Skip to content

docs: add release process #239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 9, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# See ./website/docs/releaseProcess.md for more information.

GITHUB_TOKEN=
1 change: 1 addition & 0 deletions website/docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ To contribute to the repository, make sure to take a look at our guidelines and
- [Setup the repository tooling](/docs/setupRepository): to install our tooling.
- [Add a new client](/docs/addNewClient): to add a new client spec to generate.
- [Support a new language](/docs/addNewLanguage): to add a new supported language to the API clients.
- [Release process](/docs/releaseProcess): to see how to release API clients.

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

Expand Down
42 changes: 42 additions & 0 deletions website/docs/releaseProcess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: Release process
---

# Release process

The most of the release process is automated.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to state it


## Part 1

You need `GITHUB_TOKEN` in your `.env` file. You can generate one from [Personal access token](https://github.com/settings/tokens/new) with `Repo (Full control of private repositories)` scope.

```
GITHUB_TOKEN=<YOUR-PERSONAL-ACCESS-TOKEN>
```

Once it's prepared, you can run

```bash
yarn release
```

It will create [a release issue](https://github.com/algolia/api-clients-automation/issues/220).

## Part 2

You need to review the release issue, in two parts:

1. version changes
2. CHANGELOGs

Any changes applied in the issue will be taken into account by the release process.

You can click "Approved" to approve the release, and close it, which will trigger the Part 3.

## Part 3

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 the submodules. All the submodules will have new commits on their base branch (`next`).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use submodules anymore


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 the submodule. If it is not checked, it will create a commit like `chore: update repo <DATE-STAMP>`.

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.
1 change: 1 addition & 0 deletions website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const sidebars = {
'addNewClient',
'addNewLanguage',
'pullRequest',
'releaseProcess',
],
},
{
Expand Down