Skip to content

Commit 66c48cf

Browse files
authored
Merge pull request #56 from Kuadrant/rfc-0018-release-branch-naming
Adopt RFC 0018 release branch naming (release-X.Y)
2 parents 05c6a24 + d236033 commit 66c48cf

4 files changed

Lines changed: 10 additions & 9 deletions

File tree

.github/actions/create-release-branch/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ runs:
2525
INPUT_VERSION: ${{ inputs.version }}
2626
INPUT_PUSH: ${{ inputs.push }}
2727
run: |
28-
base_branch=release-v$(echo "$INPUT_VERSION" | sed 's/[+-].*//; s/\.[0-9]*$//')
28+
base_branch=release-$(echo "$INPUT_VERSION" | sed 's/[+-].*//; s/\.[0-9]*$//')
2929
echo "branch-name=$base_branch" >> "$GITHUB_OUTPUT"
3030
3131
if git ls-remote --exit-code --heads origin "$base_branch"; then

.github/workflows/automated-release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>
4343
signoff: true
4444
base: ${{ steps.prepare-branch.outputs.branch-name }}
45-
branch: release-v${{ github.event.inputs.version }}
45+
branch: release-${{ github.event.inputs.version }}
4646
delete-branch: true
4747
title: "[Release] Developer Portal Controller v${{ github.event.inputs.version }}"
4848
body: |

.github/workflows/release.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- closed
77
branches:
88
- 'release-v[0-9]+.[0-9]+'
9+
- 'release-[0-9]+.[0-9]+'
910
workflow_dispatch: {}
1011

1112
jobs:

RELEASE.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ The version is defined in the `Makefile`:
99
VERSION ?= X.Y.Z
1010
```
1111

12-
**Important:** The `main` branch always has `VERSION ?= 0.0.0` as a placeholder. The actual version is only set on release branches (e.g., `release-v0.1`). This follows the same pattern as [kuadrant-operator](https://github.com/Kuadrant/kuadrant-operator). When building release images, the version is read from the release branch where the automated workflow updated it.
12+
**Important:** The `main` branch always has `VERSION ?= 0.0.0` as a placeholder. The actual version is only set on release branches (e.g., `release-0.1`). This follows the same pattern as [kuadrant-operator](https://github.com/Kuadrant/kuadrant-operator). When building release images, the version is read from the release branch where the automated workflow updated it.
1313

1414
## Automated Workflow (Recommended)
1515

1616
_**IMPORTANT:**_
17-
For RC2+ or patch releases, set `gitRef` to the existing release branch (e.g., `release-v0.1`), not `main`.
17+
For RC2+ or patch releases, set `gitRef` to the existing release branch (e.g., `release-0.1`), not `main`.
1818
The workflow picks up all history from the specified gitRef - cherry-pick any required fixes to the release branch before triggering the workflow.
1919

2020
### Notes
2121
* The automated workflow is best suited for RC1 of a new point release from `main`.
22-
* For patch releases (e.g., 0.1.1): Cherry-pick only the bug fix to the release branch, then run the workflow with `gitRef: release-v0.1`.
22+
* For patch releases (e.g., 0.1.1): Cherry-pick only the bug fix to the release branch, then run the workflow with `gitRef: release-0.1`.
2323
* It's not possible to cherry-pick commits within the workflow - it will include all history from the gitRef.
2424

2525
### Steps
@@ -48,14 +48,14 @@ To release a patch (e.g., `0.1.1` after `0.1.0` with a bug fix from `main`):
4848

4949
1. **Cherry-pick the fix to the release branch**:
5050
```bash
51-
git checkout release-v0.1
52-
git pull origin release-v0.1
51+
git checkout release-0.1
52+
git pull origin release-0.1
5353
git cherry-pick <commit-sha> # Only the bug fix, not new features
54-
git push origin release-v0.1
54+
git push origin release-0.1
5555
```
5656

5757
2. **Run the Automated Release workflow**:
58-
- **gitRef**: `release-v0.1` (the release branch, NOT main)
58+
- **gitRef**: `release-0.1` (the release branch, NOT main)
5959
- **version**: `0.1.1`
6060

6161
3. **Review and merge the PR**, then the release will be created automatically.

0 commit comments

Comments
 (0)