Skip to content

Commit 15b9275

Browse files
Shivs11claude
andauthored
Skip automatic helm chart bump for patch releases (#254)
## Summary - Updates the `helm` job in `release.yml` to detect patch vs non-patch releases from the git tag - Non-patch releases (e.g. `v1.5.0`) → bump chart **minor** version (e.g. `0.23.0` → `0.24.0`) - Patch releases (e.g. `v1.5.1`) → bump chart **patch** version (e.g. `0.23.0` → `0.23.1`) - `appVersion` is always set from the git tag in both cases ## Test plan - [ ] Tag a `.0` release → helm job bumps chart minor version - [ ] Tag a patch release (e.g. `.1`) → helm job bumps chart patch version 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6419f50 commit 15b9275

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,24 @@ jobs:
9999
CURRENT_VERSION=$(grep 'version:' helm/temporal-worker-controller/Chart.yaml | awk '{print $2}')
100100
echo "Current version: $CURRENT_VERSION"
101101
102-
# Split version into parts
102+
# Determine if this is a patch release based on the git tag
103+
TAG_VERSION="${GITHUB_REF_NAME#v}"
104+
TAG_PATCH=$(echo "$TAG_VERSION" | awk -F. '{print $3}')
105+
106+
# Split chart version into parts
103107
IFS='.' read -r -a VERSION_PARTS <<< "$CURRENT_VERSION"
104108
MAJOR=${VERSION_PARTS[0]}
105109
MINOR=${VERSION_PARTS[1]}
106110
PATCH=${VERSION_PARTS[2]}
107111
108-
MINOR=$((MINOR + 1))
109-
PATCH=0
112+
if [[ "$TAG_PATCH" == "0" ]]; then
113+
# Non-patch release: bump chart minor version
114+
MINOR=$((MINOR + 1))
115+
PATCH=0
116+
else
117+
# Patch release: bump chart patch version
118+
PATCH=$((PATCH + 1))
119+
fi
110120
111121
NEW_VERSION="$MAJOR.$MINOR.$PATCH"
112122
echo "New version: $NEW_VERSION"

0 commit comments

Comments
 (0)