Skip to content
README.md 1.77 KiB
Newer Older
# @semantic-release/config-release-channels
Matthew Clarkson's avatar
Matthew Clarkson committed

> [**semantic-release**](https://github.com/semantic-release/semantic-release)
> config to setup `alpha`, `beta` and `stable` release channels.
Matthew Clarkson's avatar
Matthew Clarkson committed

## Getting Started
Matthew Clarkson's avatar
Matthew Clarkson committed

Add the following to `.releaserc.yaml`:
Matthew Clarkson's avatar
Matthew Clarkson committed

```yaml
extends:
  - "@semantic-release/config-release-channels"
Matthew Clarkson's avatar
Matthew Clarkson committed
```

Combine that with one of the @semantic-release / `config-gitlab-*` projects:
Matthew Clarkson's avatar
Matthew Clarkson committed

```yaml
extends:
  - "@semantic-release/config-release-channels"
  - "@semantic-release/config-config-poetry"
```
Matthew Clarkson's avatar
Matthew Clarkson committed

## Channels
Matthew Clarkson's avatar
Matthew Clarkson committed

All work happens on `main`. When a release needs to be made, a merge can be made
to `alpha`:
Matthew Clarkson's avatar
Matthew Clarkson committed

    # We will do an 'alpha' release first
    git checkout alpha
Matthew Clarkson's avatar
Matthew Clarkson committed

    # Pull in all the changes for the release
    git merge --no-ff main
Matthew Clarkson's avatar
Matthew Clarkson committed

    # Push up the 'alpha' branch for release on the CI
    git push
Matthew Clarkson's avatar
Matthew Clarkson committed

`semantic-release` will automatically pick up the changes on the `alpha` branch
and create a new `N.N.N-alpha.X` release.
Matthew Clarkson's avatar
Matthew Clarkson committed

We can make multiple `alpha` releases, until we are comfortable we want to
promote the changes to `beta`. The same process is followed:
Matthew Clarkson's avatar
Matthew Clarkson committed

    # Move 'alpha' changes to 'beta'
    git checkout beta
    git merge --no-ff main
    git push
Matthew Clarkson's avatar
Matthew Clarkson committed

This will result in a `N.N.N-beta.N` release.
Matthew Clarkson's avatar
Matthew Clarkson committed

Finally, when we are happy with the stability of the `beta` channel we can
promote to `stable`:
Matthew Clarkson's avatar
Matthew Clarkson committed

    # Move 'beta' changes to 'stable'
    git checkout stable
    git merge --no-ff main
    git push
Matthew Clarkson's avatar
Matthew Clarkson committed

This will create the final `N.N.N` release for the changes. The final release
can be merged back to the prerelease branches so that subsequent prereleases are
for the _next_ major version:
Matthew Clarkson's avatar
Matthew Clarkson committed

    # Apply stable release back to the prerelease channels
    git checkout alpha
    git merge --no-ff vN.N.N
    git push
    git checkout beta
    git merge --no-ff vN.N.N
    git push