# Release

Currently, the gardener-provider still uses Pulumi for deployment in [infra-cd](https://github.com/tidbcloud/infra-cd) repo.

## Release Process

1. Cut a release branch from main branch using the [GitHub Action](https://github.com/tidbcloud/infra-provider/actions/workflows/cut-branches.yaml). **The name entered to the GitHub Action should in this form `release-0.30`**.

    This `Action` will trigger docker image build and trigger infra-cd [Cut Release Branch Action](https://github.com/tidbcloud/infra-cd/actions/workflows/cut-branches.yaml) to cut a same release branch as in infra-provider. And then trigger a deploy to staging environment.

2. When the new version is verified in staging environment and ready to release to prod environment. In infra-provider repo, create a release tag from the release branch. For example, create a git tag from `gardener-arch/release-0.30` branch. The tag should be named like `gardener-arch/v0.30.0`.

    It's recommended to create the release tag using GitHub [Release Page](https://github.com/tidbcloud/infra-provider/releases/new) so we can add some release notes. A prod GitHub Action pipeline will be triggered to bump the version of prod eks-provider image in [infra-cd](https://github.com/tidbcloud/infra-cd).

3. **Make sure the infra-cd repo release branch's prod Pulumi configuration https://github.com/tidbcloud/infra-cd/blob/gardener-arch/release-x.yz/projects/infra-api/Pulumi.prod.yaml has `image-tag` value bumped to new version**. Create a same release git tag from the release branch in infra-cd repo. Once the tag is created, a prod CD pipeline will be triggered to deploy to prod environment.

For hotfix PR, it needs to be cherry-picked to the recent release branch, and then create a new git tag from the release branch.
