feat(ci): automate semantic versioning and publishing#49
Open
srgfrancisco wants to merge 1 commit into
Open
Conversation
…antic-release Replace manual version bumping and tag-triggered publishing with fully automated semver workflow. On every merge to main, python-semantic-release analyzes conventional commits to determine bump type, updates pyproject.toml, creates a tag, publishes to PyPI, and creates a GitHub Release. - Add release.yml workflow with test + semantic-release + PyPI publish - Configure python-semantic-release in pyproject.toml - Use importlib.metadata for dynamic version in cli.py (single source of truth) - Remove stale __version__ from __init__.py - Remove redundant publish.yml and publish job from ci.yml - Scope ci.yml to pull_request only (release.yml handles push-to-main)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
python-semantic-releasemain, conventional commits are analyzed to determine bump type (patch/minor/major), version is bumped inpyproject.toml, tagged, published to PyPI, and a GitHub Release is createdchore/docs/cicommits exist since last tag, no release is createdChanges
.github/workflows/release.yml— test + semantic-release + PyPI publish + GitHub Release[tool.semantic_release]config topyproject.tomlddogctl/cli.py— dynamic version viaimportlib.metadata(single source of truth inpyproject.toml)__version__ = "1.0.0"fromddogctl/__init__.py.github/workflows/publish.yml(superseded by release.yml).github/workflows/ci.yml, scoped CI topull_requestonlyCLAUDE.mdreleasing sectionManual setup required after merge
srgfrancisco/ddogctl)RELEASE_TOKENin repo secretspublish.yml→release.yml, jobreleaseTest plan
black --checkcleanruff checkclean