Skip to content

Commit 66626f2

Browse files
authored
Merge pull request #3075 from embik/update-release-process
📖 Update release process with release note generation
2 parents c1cb2e6 + 450c872 commit 66626f2

File tree

2 files changed

+32
-12
lines changed

2 files changed

+32
-12
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,7 @@ Fixes #
2323
## Release Notes
2424

2525
<!--
26-
Please add a release note using the following format:
27-
28-
```release-note
29-
<description of change>
30-
```
26+
Please add a release note in the block below. Leave NONE only if no user-facing changes are in this PR.
3127
-->
3228

3329
```release-note

docs/content/developers/publishing-a-new-kcp-release.md

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ description: >
99
You currently need write access to the [kcp-dev/kcp](https://github.com/kcp-dev/kcp) repository to perform these
1010
tasks.
1111

12-
You also need an available team member with approval permissions from <https://github.com/openshift/release/blob/master/ci-operator/config/kcp-dev/kcp/OWNERS>.
13-
1412
## Create git tags
1513

1614
### Prerequisite - make sure you have a GPG signing key
@@ -69,17 +67,43 @@ git checkout -b "release-$VERSION" "$REF"
6967
git push "$REMOTE" "release-$VERSION"
7068
```
7169

70+
## Generate release notes
71+
72+
To generate release notes from the information in PR descriptions you should use Kubernetes' [release-notes](https://github.com/kubernetes/release/tree/master/cmd/release-notes) tool.
73+
This tool will use the `release-notes` blocks in PR descriptions and the `kind/` labels on those PRs to find user-facing changes and categorize them.
74+
You can run the command below to install the latest version of it:
75+
76+
```shell
77+
go install k8s.io/release/cmd/release-notes@latest
78+
```
79+
80+
To use `release-notes` you will need to generate a GitHub API token (Settings -> Developers settings -> Personal access tokens -> Fine-grained tokens). A token with _Public Repositories (read-only)_ repository access and no further permissions is sufficient. Store the token somewhere safe and export it as `GITHUB_TOKEN` environment variable.
81+
82+
Then, run run the `release-notes` tool (set `PREV_VERSION` to the version released before the one you have just released).
83+
84+
```shell
85+
VERSION=1.2
86+
PREV_VERSION=1.1
87+
release-notes \
88+
--required-author='' \
89+
--org kcp-dev \
90+
--repo kcp \
91+
--branch main \
92+
--start-rev v$PREV_VERSION \
93+
--end-rev v$VERSION \
94+
--output CHANGELOG.md
95+
```
96+
97+
Don't commit the `CHANGELOG.md` to the repository, just keep it around to update the release on GitHub (next step).
98+
7299
## Review/edit/publish the release in GitHub
73100

74101
The [goreleaser](https://github.com/kcp-dev/kcp/actions/workflows/goreleaser.yml) workflow automatically creates a draft GitHub release for each tag.
75102

76103
1. Navigate to the draft release for the tag you just pushed. You'll be able to find it under the [releases](https://github.com/kcp-dev/kcp/releases) page.
77104
2. If the release notes have been pre-populated, delete them.
78-
3. For the "previous tag," select the most recent, appropriate tag as the starting point
79-
1. If this is a new minor release (e.g. v0.8.0), select the initial version of the previous minor release (e.g. v0.7.0)
80-
2. If this is a patch release (e.g. v0.8.7), select the previous patch release (e.g. v0.8.6)
81-
4. Click "Generate release notes"
82-
5. Publish the release
105+
3. Copy release notes from the `CHANGELOG.md` file you generated in the previous step.
106+
4. Publish the release.
83107
84108
## Notify
85109

0 commit comments

Comments
 (0)