Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ name: Build and Release
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+a[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+b[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+rc[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+a[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+b[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+rc[0-9]+"
workflow_dispatch: # Allow manual triggering

permissions:
Expand Down Expand Up @@ -134,9 +134,11 @@ jobs:
- name: Extract version from tag
id: get_version
run: |
VERSION=${GITHUB_REF#refs/tags/}
TAG=${GITHUB_REF#refs/tags/}
# Strip 'v' prefix for version number (PyPI doesn't use it)
VERSION=${TAG#v}
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
echo "tag=$TAG" >> $GITHUB_OUTPUT

- name: Generate release notes
id: release_notes
Expand Down Expand Up @@ -196,9 +198,11 @@ jobs:
- name: Extract version from tag
id: get_version
run: |
VERSION=${GITHUB_REF#refs/tags/}
TAG=${GITHUB_REF#refs/tags/}
# Strip 'v' prefix for version number (PyPI doesn't use it)
VERSION=${TAG#v}
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
echo "tag=$TAG" >> $GITHUB_OUTPUT

- name: Success notification
run: |
Expand Down
10 changes: 6 additions & 4 deletions helm_sdkpy/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ def __init__(
options_json = json.dumps(options)
options_cstr = ffi.new("char[]", options_json.encode("utf-8"))

result = self._lib.helm_sdkpy_config_create(ns_cstr, kc_cstr, kctx_cstr, options_cstr, self._handle)
result = self._lib.helm_sdkpy_config_create(
ns_cstr, kc_cstr, kctx_cstr, options_cstr, self._handle
)
check_error(result)

self._handle_value = self._handle[0]
Expand All @@ -120,7 +122,7 @@ def __exit__(self, exc_type, exc_val, exc_tb):

@classmethod
def from_service_account(
cls,
cls,
namespace: str = "default",
plain_http: bool = False,
insecure_skip_tls_verify: bool = False,
Expand Down Expand Up @@ -156,8 +158,8 @@ def from_service_account(
... )
"""
return cls(
namespace=namespace,
kubeconfig=None,
namespace=namespace,
kubeconfig=None,
kubecontext=None,
plain_http=plain_http,
insecure_skip_tls_verify=insecure_skip_tls_verify,
Expand Down
54 changes: 53 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,56 @@ docs-help:
@echo " docs-build - Build for production (includes API docs generation)"
@echo " docs-generate-api - Generate API docs from SDK source"
@echo " docs-serve - Serve built site"
@echo " docs-clean - Clean build artifacts"
@echo " docs-clean - Clean build artifacts"

# Release helm-sdkpy with a new version
# Usage: just release 0.0.21
[group("release")]
release version:
#!/usr/bin/env bash
set -euo pipefail

echo "🔖 Releasing helm-sdkpy version {{version}}..."

# Create release branch
echo "🌿 Creating release branch release/{{version}}..."
git checkout -b "release/{{version}}"

# Bump pyproject.toml version
echo "📝 Updating pyproject.toml..."
sed -i 's/^version = ".*"/version = "{{version}}"/' pyproject.toml

# Update docusaurus version.yml if it exists
if [ -f "docusaurus/data/version.yml" ]; then
echo "📝 Updating docusaurus/data/version.yml..."
sed -i 's/^version: .*/version: "{{version}}"/' docusaurus/data/version.yml
fi

# Regenerate lock file
echo "🔒 Regenerating uv.lock..."
uv lock --no-cache

# Commit changes
echo "📦 Committing version bump..."
git add pyproject.toml uv.lock
if [ -f "docusaurus/data/version.yml" ]; then
git add docusaurus/data/version.yml
fi
git commit -m "chore: bump version to {{version}}"

# Push release branch
echo "🚀 Pushing release branch..."
git push origin "release/{{version}}"
sleep 1

# Create tag
echo "🏷️ Creating tag..."
git tag -a "v{{version}}" -m "helm-sdkpy release version {{version}}"

# Push tag
echo "🚀 Pushing tag..."
git push origin "v{{version}}"

echo "✅ Released helm-sdkpy version {{version}}"
echo " Branch: release/{{version}}"
echo " Tag: v{{version}}"