Skip to content

Commit

Permalink
Merge pull request #61 from LiorLieberman/docs-update
Browse files Browse the repository at this point in the history
Document the new release process
  • Loading branch information
k8s-ci-robot authored Oct 17, 2023
2 parents d277aad + d1aa3e5 commit 4e14217
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: release
on:
push:
tags:
- "v*.*.*"
- "v*.*"
permissions:
contents: write
jobs:
Expand Down
4 changes: 2 additions & 2 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
# goreleaser documentation at https://goreleaser.com
before:
hooks:
# You may remove this if you don't use go modules.
Expand Down Expand Up @@ -44,6 +43,7 @@ release:
changelog:
# leaving this github-native option in case we will want to use the GitHub release notes generation API in the future.
# use: github-native
use: github
sort: asc
filters:
exclude:
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changelog

## Table of Contents

- [v0.1.0](#v010-rc1)

## v0.1.0-rc1
<!-- TODO(liorlieberman) -->
63 changes: 57 additions & 6 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,60 @@
# Release Process

The Kubernetes Template Project is released on an as-needed basis. The process is as follows:
## Overview

The Ingress2Gateway Project is CLI project that helps with translating Ingress and provider related resources to [Gateway API](https://github.com/kubernetes-sigs/gateway-api) resources.

## Releasing a new version

### Writing a Changelog

To simplify release notes generation, we recommend using the [Kubernetes release
notes generator](https://github.com/kubernetes/release/blob/master/cmd/release-notes):

```
go install k8s.io/release/cmd/release-notes@latest
export GITHUB_TOKEN=your_token_here
release-notes --start-sha EXAMPLE_COMMIT --end-sha EXAMPLE_COMMIT --branch main --repo ingress2gateway --org kubernetes-sigs
```

This output will likely need to be reorganized and cleaned up a bit, but it
provides a good starting point. Once you're satisfied with the changelog, create
a PR. This must go through the regular PR review process and get merged into the
`main` branch. Approval of the PR indicates community consensus for a new
release.

### Patch a release

1. Create a new branch in your fork named something like `<githubuser>/release-x.x.x`. Use the new branch
in the upcoming steps.
1. Use `git` to cherry-pick all relevant PRs into your branch.
1. Update the version references in the codebase with the new semver tag.
1. Create a pull request of the `<githubuser>/release-x.x.x` branch into the `release-x.x` branch upstream
(which should already exist since this is a patch release). Add a hold on this PR waiting for at least
one maintainer/codeowner to provide a `lgtm`.
1. Create a tag using the `HEAD` of the `release-x.x` branch. This can be done using the `git` CLI or
Github's [release][release] page.

### Release a MAJOR or MINOR release

1. Cut a `release-major.minor` branch that we can tag things in as needed.
1. Check out the `release-major.minor` release branch locally.
1. Update the version references in the codebase with the new semver tag.
1. Verify the changelog is up to date with the desired changes.
1. Create a tag using the `HEAD` of the `release-x.x` branch. This can be done using `git tag -sa $VERSION` CLI or
Github's [release][release] page.
1. Run `git push origin $VERSION`, this will trigger a github workflow that will create the release.
1. Verify the [releases page](https://github.com/kubernetes-sigs/ingress2gateway/releases) to ensure that the release meets the expectations.
1. Optional: Send an annoncement email to `[email protected]` with the subject `[ANNOUNCE] ingress2gateway $VERSION is released`


### Release a RC release

1. Open a PR with changes of the version references in the codebase.
1. Include necessary changelog updates to CHANGELOG.md in this PR.
1. Merge the PR
1. Tag the release using the commit on main where the PR merged. This can be done using the git CLI `git tag -sa $VERSION`.
1. Run `git push origin $VERSION`, this will trigger a github workflow that will create the release.
1. Verify the [releases page](https://github.com/kubernetes-sigs/ingress2gateway/releases) to ensure that the release meets the expectations.
1. Optional: Send an annoncement email to `[email protected]` with the subject `[ANNOUNCE] ingress2gateway $VERSION is released`

1. An issue is proposing a new release with a changelog since the last release
1. All [OWNERS](OWNERS) must LGTM this release
1. An OWNER runs `git tag -s $VERSION` and inserts the changelog and pushes the tag with `git push $VERSION`
1. The release issue is closed
1. An announcement email is sent to `[email protected]` with the subject `[ANNOUNCE] kubernetes-template-project $VERSION is released`

0 comments on commit 4e14217

Please sign in to comment.