From 9d5de8b56c52aaccf1f8f7755360f76d9a20c23d Mon Sep 17 00:00:00 2001 From: Anna Kapuscinska Date: Thu, 30 May 2024 13:07:10 +0100 Subject: [PATCH] Update the release process with release notes instructions * Mention isovalent/tetragon-github-tools which we started using for generating release notes * Add a script and instructions for publishing upgrade notes Signed-off-by: Anna Kapuscinska --- .github/ISSUE_TEMPLATE/release_template.md | 19 +++++++++++++++---- contrib/update-upgrade-notes.sh | 18 ++++++++++++++++++ 2 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 contrib/update-upgrade-notes.sh diff --git a/.github/ISSUE_TEMPLATE/release_template.md b/.github/ISSUE_TEMPLATE/release_template.md index 826fcca7858..030f9d14570 100644 --- a/.github/ISSUE_TEMPLATE/release_template.md +++ b/.github/ISSUE_TEMPLATE/release_template.md @@ -14,16 +14,23 @@ assignees: '' export RELEASE=v0.8.1 -- [ ] Open a pull request to update the Helm chart and docs version: +- [ ] Open a pull request to update the Helm chart and docs: git checkout -b pr/prepare-$RELEASE + + # update Helm chart ./contrib/update-helm-chart.sh $RELEASE make -C install/kubernetes git add install/kubernetes/tetragon/ - # update hugo version + + # update version in docs (Hugo config) sed -i "s/^version =.*/version = \"${RELEASE}\"/" docs/hugo.toml git add docs/ + # update upgrade notes + ./contrib/update-upgrade-notes.sh $RELEASE + git add contrib/upgrade-notes/ + git commit -s -m "Prepare for $RELEASE release" git push origin HEAD @@ -70,8 +77,12 @@ gitGraph - [ ] When a tag is pushed, a GitHub Action job takes care of creating a new GitHub draft release, building artifacts and attaching them to the draft release. Once the draft is available in the [releases page]: - - [ ] Use the "Auto-generate release notes" button to generate the release notes. - - [ ] Review the release notes and click on "Publish Release" at the bottom. + - [ ] Use `tgt-notes` from [tetragon-github-tools](https://github.com/isovalent/tetragon-github-tools/) + to generate a first version of the release notes based on `release-note/` tags and PR messages. + - [ ] Copy upgrade notes from `contrib/upgrade-notes/vX.Y.Z.md` file into the release notes. + (Skip if there are no upgrade notes - it's quite likely for patch releases). + - [ ] Review the release notes and update them as needed. + - [ ] Click on "Publish Release" at the bottom. - [ ] Publish Helm chart - Follow [cilium/charts RELEASE.md] to publish the Helm chart. diff --git a/contrib/update-upgrade-notes.sh b/contrib/update-upgrade-notes.sh new file mode 100644 index 00000000000..235e5b42b82 --- /dev/null +++ b/contrib/update-upgrade-notes.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +set -ex + +if [ -z "$1" ] || [[ ! $1 =~ ^v[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then + echo "USAGE: ./contrib/update-upgrade-notes.sh vX.Y.Z" + exit 1 +fi + +NOTES_DIR="${NOTES_DIR:-contrib/upgrade-notes}" +version=$1 + +# Copy the latest upgrade notes to a version-specific file and create new latest from the template. +# Skip for pre-releases. +if [[ ! "$version" == *"-"* ]]; then + cp "$NOTES_DIR/latest.md" "$NOTES_DIR/$version.md" + cp "$NOTES_DIR/template.md" "$NOTES_DIR/latest.md" +fi