diff --git a/.gitlab/ci/release.gitlab-ci.yml b/.gitlab/ci/release.gitlab-ci.yml index acac59a6f06ee47767698ee2c63b6e18d1a742f3..089cef1e357f26979892284d887c5031b611b37c 100644 --- a/.gitlab/ci/release.gitlab-ci.yml +++ b/.gitlab/ci/release.gitlab-ci.yml @@ -11,7 +11,7 @@ before_script: - npm install -g semantic-release @semantic-release/gitlab script: - - semantic-release $DRY_RUN_OPT -b $CI_COMMIT_REF_NAME + - semantic-release $DRY_RUN_OPT only: variables: - $CI_API_V4_URL == "https://gitlab.com/api/v4" @@ -39,6 +39,9 @@ publish: only: refs: - master@gitlab-org/cluster-integration/auto-deploy-image + - beta@gitlab-org/cluster-integration/auto-deploy-image + - /^\d+\.x$/@gitlab-org/cluster-integration/auto-deploy-image + - /^\d+\.\d+\.x$/@gitlab-org/cluster-integration/auto-deploy-image publish-dryrun: extends: .semantic-release diff --git a/README.md b/README.md index bdb76d0c3134d9818d9050560c2682d34f66b0c0..8807d47d1848262c2b1bc6566f7dcbab989b8984 100644 --- a/README.md +++ b/README.md @@ -56,3 +56,48 @@ an empty commit summarizing your changes like so: ``` git commit --allow-empty -m '[BREAKING CHANGE|feat|fix]: ' ``` + +## Backport + +For backporting a change to a previous release, please follow [this recipe](https://github.com/semantic-release/semantic-release/blob/master/docs/recipes/maintenance-releases.md#publishing-maintenance-releases). + +Here is an example: + +Given you have + +- `v2.0.0` tag, which is the latest tag of `v2`. +- `v1.1.1` tag, which is the latest tag of `v1`. +- `master` branch, which points to `v2.0.0`. + +and you want to release a bug fix to both `v1` and `v2` releases. + +You process the following actions: + +- Create `1.x` branch from `v1.1.1`. +- Merge a fix to `1.x` branch. `semantic-release` creates a release with `v1.1.2` tag. +- Merge a fix to `master` branch. `semantic-release` creates a release with `v2.0.1` tag. + +NOTE: **NOTE** +Ensure that the maintenance release branch (e.g. `1.x`) is [protected](https://docs.gitlab.com/ee/user/project/protected_branches.html). + +## Pre-release + +For publishing a pre-release, please follow [this recipe](https://github.com/semantic-release/semantic-release/blob/master/docs/recipes/pre-releases.md#publishing-pre-releases). + +Here is an example: + +Given you have + +- `v1.1.1` tag, which is the latest tag of `v1`. +- `master` branch, which points to `v1.1.1`. + +and you want to publish a pre-release. + +You process the following actions: + +- Create `beta` branch from the latest `master`. +- Merge a fix to `beta` branch. `semantic-release` creates a release with `2.0.0-beta.1` tag. +- When you make an official release, merge `beta` to `master`. `semantic-release` creates a release with `2.0.0` tag. + +NOTE: **NOTE** +Ensure that the pre-release release branch (e.g. `beta`) is [protected](https://docs.gitlab.com/ee/user/project/protected_branches.html).