This repository ships both a CLI and a Python package.
This guide is safe to use as a local release rehearsal for a test version. It does not assume that tagging, GitHub Release creation, or PyPI publishing must happen in the current working tree.
Run the local validation gates before tagging a release:
python -m pytest -q
python -m build
python -m twine check dist/*If you are only validating a test build locally:
- keep the repository on an unreleased working branch
- run the validation gates
- inspect the generated files in
dist/ - install the wheel in an isolated environment
- do not tag or upload anything yet
When doing repeated rehearsals, remove old dist/ contents first so you do not accidentally validate or upload stale artifacts from another version.
Optional clean-install smoke check:
python -m venv .venv-smoke
. .venv-smoke/bin/activate
pip install dist/code2skill-*.whl
code2skill --help
python -m code2skill --versionWhen cutting a new release:
- Update
versioninpyproject.toml - Update
__version__insrc/code2skill/version.py - Add a new note in
docs/releases/ - Update
CHANGELOG.md
For a test-version rehearsal, you can skip this section and keep the current version unchanged.
This repository includes:
.github/workflows/ci.yml: unit tests plus package build and install smoke check.github/workflows/release.yml: version validation, build,twine check, and GitHub Release creation on version tags.github/workflows/publish-pypi.yml: manual PyPI publishing from a selected ref
The checked-in release workflow is intentionally repository-focused. It does not publish to PyPI automatically.
PyPI publishing is handled separately through the manual publish-pypi.yml workflow.
Use .github/workflows/publish-pypi.yml only when you explicitly want to publish a built version to PyPI.
Recommended flow:
- prepare and push the final release commit
- make sure
src/code2skill/version.pyhas the final version andpyproject.tomlstill points to the dynamic version source - run the
Releaseworkflow via a version tag so GitHub Release creation succeeds - manually run
Publish PyPIfrom the same ref and provide the exact version string
This keeps repository release automation and package publication separate.
- do not use
twine upload dist/*ifdist/contains artifacts from multiple versions - upload only the exact wheel and sdist for the intended version
- tag and publish only from a clean
git status