Release instruction

This document describes how to prepare and publish a new Botkube release.

Prerequisites

Steps

The botkube repository

  1. Clone and navigate to the root of the botkube repository.

  2. Export required environment variables:

    export GITHUB_USERNAME="{username}" # GitHub username
    export GITHUB_TOKEN="{token}" # GitHub personal access token
    
  3. Log in to Docker

    echo $GITHUB_TOKEN | docker login ghcr.io -u ${GITHUB_USERNAME} --password-stdin
    
  4. Update .release file with the new version in Semantic Versioning 2.0 format.

    release=v{semVer version}
    

    For example:

    release=v0.12.5
    
  5. Run release script:

    ./hack/release.sh
    

    This script:

    • Updates version in Helm chart,
    • Generates changelog based on pull requests and issues,
    • Runs tests,
    • Creates and pushes git tag,
    • Publishes Docker images,
    • Publishes GitHub release.
  6. Update newly created GitHub release description using GitHub UI.

    • Copy the generated changelog for the released version from the ./CHANGELOG.md file.
    • Edit the GitHub release and paste the changelog into the description field.
  7. Publish the modified Helm charts:

    GITHUB_ORG="infracloudio"
    GITHUB_REPO="charts"
    git clone -b gh-pages "https://github.com/${GITHUB_ORG}/${GITHUB_REPO}.git" /tmp/botkube-charts
    helm package -d /tmp/botkube-charts ./helm/botkube
    cd /tmp/botkube-charts
    helm repo index --url "https://${GITHUB_ORG}.github.io/${GITHUB_REPO}/" --merge ./index.yaml .
    git add .
    git commit -m "Release Botkube Helm chart"
    git push "https://${GITHUB_TOKEN}@github.com/${GITHUB_ORG}/${GITHUB_REPO}.git"
    cd -
    rm -rf /tmp/botkube-charts
    

The botkube-docs repository

  1. Clone and navigate to the root of the botkube repository.

  2. Run the release script:

    ./hack/release.sh
    

    You can customize the source repository by setting GITHUB_ORG, GITHUB_REPO and REPO_BRANCH environment variables.

    This script:

    • Updates Docker image versions in the documentation,
    • Updates changelog,
    • Updates Helm chart options,
    • Creates and pushes git tag.