Prompt file imported from apetta/agent-xlsx (
.claude/commands/release.md). Fill in{{arguments}}before use. Copyright stays with the author.
State
- Recent commits (tagged): !
git log --oneline --decorate -20 - Latest tag: !
git tag --sort=-v:refname | head -1 - Status: !
git status --short - Version: !
grep '^version' pyproject.toml
Steps
Stop and report if any step fails.
-
Pre-flight: Verify clean working tree and on
main. If there are no commits since the last tag, report "Nothing to release" and stop. -
Assess bump: Analyse all commits since the last tag:
BREAKING CHANGEor!:in any commit →major- Any
feat:commit →minor - Only
fix:,chore:,docs:,refactor:→patch - Take the highest applicable level.
- If
{{arguments}}is provided and matches the assessed level, proceed. - If
{{arguments}}is provided but disagrees with the assessment, flag the mismatch with reasoning and ask the user to confirm or revise. - If
{{arguments}}is empty, propose the assessed bump and ask the user to confirm.
-
Compute version: Parse current from
pyproject.toml, apply bump. Stateold → new. -
Update versions in exactly these 2 files:
pyproject.toml→version = "X.Y.Z"src/agent_xlsx/__init__.py→__version__ = "X.Y.Z"
Grep the old version string across
pyproject.tomlandsrc/to confirm zero remaining hits. -
Sync lockfile:
uv sync --group dev -
Changelog: Add entry to
docs/src/app/changelog/page.mdxbelow# Changelog, above the previous release entry. Review all commits since the previous tag. Follow the existing format and tone. Keep it concise; consolidate related fixes into single bullets. -
Validate:
uv run ruff check && uv run ruff format --check && uv run ty check && uv run pytest -v -
Commit: Stage
pyproject.toml,src/agent_xlsx/__init__.py,uv.lock, anddocs/src/app/changelog/page.mdx. Commit message:chore: release vX.Y.Z -
Tag + push:
git tag vX.Y.Z && git push origin main --tags -
GitHub release: Derive notes from the changelog entry. Use
gh release create vX.Y.Z --title "vX.Y.Z" --notes "..."(note: the flag is--notes/-n, NOT--body). -
Monitor:
gh run watch $(gh run list --limit 1 --json databaseId -q '.[0].databaseId')— report final status. If CI fails after push, fix the issue, commit, then force-move the tag (git tag -f vX.Y.Z && git push origin main --tags --force), delete the GitHub release (gh release delete vX.Y.Z --yes), and recreate it to retrigger the publish workflow. -
Verify:
uvx --refresh agent-xlsx@X.Y.Z --version— confirm the published version resolves correctly from PyPI. -
Summary: Old → new version, PyPI URL, GitHub release URL, CI status.