Skip to content

feat(7): add a release skill with tested numbering logic#8

Merged
alanbchristie merged 1 commit into
mainfrom
squonk2-data-manager-viz-operator_abc-7-release-skill
Jun 8, 2026
Merged

feat(7): add a release skill with tested numbering logic#8
alanbchristie merged 1 commit into
mainfrom
squonk2-data-manager-viz-operator_abc-7-release-skill

Conversation

@alanbchristie

Copy link
Copy Markdown
Collaborator

Fixes #7

Adds a Claude Code release skill (.claude/skills/release/) that provides
the repository's release logic.

What it does

  • Always cuts from the latest main (fast-forward check).
  • Blocks releases when CI has failed — checks the build workflow run for
    the exact commit being released and refuses unless it succeeded.
  • Semver numbering with alpha / beta / rc pre-releases
    (X.Y.Z-channel.N, first N is 1) and full releases (X.Y.Z).
  • Major must match the operator's pinned kubernetes package
    (operator/requirements.txt) — enforced by the helper.
  • Pre-releases are marked as a GitHub Pre-release (--prerelease).
  • Generates release notes from all commits/PRs since the prior release
    (gh release create --generate-notes).
  • Asks the user for a release title and the channel
    (alpha/beta/rc/final).

Design

The interactive, outward-facing orchestration (CI check, prompts, release
creation) lives in SKILL.md. The deterministic, easy-to-get-wrong numbering
logic
lives in a pure, unit-tested helper:

  • .claude/skills/release/next_release.pykubernetes_major, next_tag,
    is_prerelease, plus a small major/next CLI the skill calls from a shell.
  • tests/test_release.py — 14 tests (first-pre-release-is-1, per-channel
    incrementing, major-mismatch/ malformed-base/ unknown-channel rejection,
    final-release-no-suffix and no-reuse).

Testing

TDD — tests written first. Full suite passes (45 tests: 31 existing + 14 new),
pre-commit is clean, and the helper type-checks under mypy --strict.

🤖 Generated with Claude Code

Add a Claude Code 'release' skill (.claude/skills/release/) that cuts a
release of the operator from the latest main:

- Refuses to release when the 'build' CI run for the commit has not succeeded.
- Enforces that the release major matches the pinned 'kubernetes' package.
- Supports semver pre-releases (alpha/beta/rc, numbered from 1) marked as a
  GitHub Pre-release, and full releases.
- Asks the user for a title and the channel, generates release notes from the
  commits since the prior release, and creates the GitHub release/tag.

The numbering logic lives in a pure, unit-tested helper
(next_release.py / tests/test_release.py) so it is deterministic across
releases; the SKILL.md orchestrates the interactive, cluster-facing steps.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@alanbchristie alanbchristie merged commit 21f153b into main Jun 8, 2026
2 checks passed
@alanbchristie alanbchristie deleted the squonk2-data-manager-viz-operator_abc-7-release-skill branch June 8, 2026 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release SKILL

1 participant