python-release-management

Automates Python project releases with semantic versioning, changelogs, and GitHub Actions pipelines.

1|2|Updated Nov 25, 2017
One-click install
npx skills add https://github.com/asarchami/dotfiles --skill python-release-management-asarchami
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-release-management
Source: https://github.com/asarchami/dotfiles/tree/main/dot_config/opencode/skills/python/release-management
Command: npx skills add https://github.com/asarchami/dotfiles --skill python-release-management-asarchami

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Managing Python package releases involves coordinating version bumps, changelog updates, git tags, and PyPI publishing, which is error-prone when done manually. This Skill provides a consistent workflow for versioning, changelog maintenance, and release automation. ## Core Features & Use Cases - Semantic Versioning Guidance: Applies MAJOR.MINOR.PATCH rules to decide version bumps based on API changes. - Changelog Maintenance: Structures changelogs in Keep a Changelog format with Added, Changed, Deprecated, Removed, Fixed, and Security categories. - Release Automation: Provides a GitHub Actions workflow that builds distributions and publishes to PyPI on version tags, plus deprecation patterns using warnings. - Use Case: When preparing a v1.2.0 release, use this Skill to update the changelog, bump versions in pyproject.toml and init.py, tag the release, and let CI publish to PyPI automatically. ## Quick Start Help me prepare and publish version 1.2.0 of my Python package with an updated changelog and automated PyPI release.

Frequently Asked Questions about python-release-management

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate Python package releases with GitHub Actions?

Create a workflow triggered on version tags (v*) that checks out the code, builds distributions with python -m build, creates a GitHub release, and publishes to PyPI using pypa/gh-action-pypi-publish with trusted publishing via id-token permissions.

How do I decide between major, minor, and patch version bumps?

Use semantic versioning rules: bump PATCH for bug fixes without API changes, MINOR for backward-compatible new features, and MAJOR for breaking changes. The version format is MAJOR.MINOR.PATCH, such as 1.2.3.

What is the Keep a Changelog format for Python projects?

Keep a Changelog organizes entries under versioned sections with an Unreleased section at top. Each release groups changes into categories: Added, Changed, Deprecated, Removed, Fixed, and Security, with dates in ISO format.

How do I deprecate a Python function properly?

Emit a DeprecationWarning using the warnings module with stacklevel=2, stating the replacement and removal version in the message. Document the deprecation in the changelog under a Deprecated section before removing it in a major release.

Where should the version number live in a Python package?

Define __version__ in the package's __init__.py and keep it in sync with pyproject.toml, or read it at runtime using importlib.metadata.version() to avoid duplication. Both approaches are covered in the release checklist.