Skip to content

build: Add Python Semantic Release for automated versioning#2

Open
madeleine-c wants to merge 1 commit into
mainfrom
feat/semantic-release-setup
Open

build: Add Python Semantic Release for automated versioning#2
madeleine-c wants to merge 1 commit into
mainfrom
feat/semantic-release-setup

Conversation

@madeleine-c

Copy link
Copy Markdown
Collaborator

Summary

This PR sets up Python Semantic Release for automated version management, changelog generation, and PyPI releases.

Changes

  • Added python-semantic-release to dev dependencies in pyproject.toml
  • Configured semantic release with version management for both pyproject.toml and init.py
  • Created GitHub Actions workflow for automated releases
  • Added initial CHANGELOG.md documenting v0.1.0 release
  • Updated CONTRIBUTING.md with comprehensive commit message guidelines

How It Works

Commit Types & Version Bumps

  • feat: → MINOR bump (0.1.0 → 0.2.0)
  • fix: → PATCH bump (0.1.0 → 0.1.1)
  • perf: → PATCH bump (0.1.0 → 0.1.1)
  • feat!: or BREAKING CHANGE: → MAJOR bump (0.1.0 → 1.0.0)
  • docs:, test:, chore: → No version bump

Automated Release Process

When commits are pushed to main:

  1. Python Semantic Release analyzes commit messages
  2. Determines version bump based on commit types
  3. Updates version in pyproject.toml and init.py
  4. Generates/updates CHANGELOG.md
  5. Creates a git tag (e.g., v0.2.0)
  6. Publishes to PyPI
  7. Creates a GitHub Release

Next Steps After Merge

  1. Set up PyPI token in GitHub repository secrets:

    • Name: PYPI_API_TOKEN
    • Get token from PyPI Account Settings → API tokens
  2. Test the workflow by merging a commit with conventional format to main

Test Plan

  • Configuration validated in pyproject.toml
  • GitHub Actions workflow created
  • Documentation updated
  • Ready for PyPI token configuration

🤖 Generated with Claude Code

- Add python-semantic-release>=8.0.0 to dev dependencies
- Configure semantic release in pyproject.toml with version management
- Create GitHub Actions workflow for automated releases to PyPI
- Add initial CHANGELOG.md with v0.1.0 release notes
- Update CONTRIBUTING.md with comprehensive commit message guidelines
- Document conventional commit format and version bump rules

This setup enables automated version bumping, changelog generation,
and PyPI releases based on conventional commit messages.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Committed-By-Agent: claude
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedpython-semantic-release@​10.4.195100100100100
Addedpytest-cov@​7.0.0100100100100100

View full report

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.

1 participant