Skip to content
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

docs: add release process #239

Merged
merged 5 commits into from
Mar 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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=
2 changes: 2 additions & 0 deletions website/docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ 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.
- [Pull-request](/docs/pullRequest): to see how to send pull-requests.
- [Release process](/docs/releaseProcess): to see how to release API clients.
shortcuts marked this conversation as resolved.
Show resolved Hide resolved

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

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

# Release process

## Part 1

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.

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

Once setup, 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.

Clicking "Approved" to approve the release, and closing it, will trigger the [Part 3](#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 each language repository on their `next` branch.

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>`.

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