This project is set up to publish to PyPI from GitHub Actions using PyPI Trusted Publishing.
- Create a PyPI account for the maintainer if you do not already have one.
- In PyPI, go to
Account settings->Publishing. - Add a pending trusted publisher with:
- PyPI project name:
nomnom-py - Owner:
MohammadKanaan - Repository:
nomnom-py - Workflow file:
publish.yml - Environment:
pypi
- PyPI project name:
- In GitHub, create an environment named
pypi. - Require manual approval for that environment before the publish job runs.
uv sync --dev
uv run pytest
uv run ruff check .
uv run mypy nomnom
uv build
uvx twine check dist/*- Update
[project].versioninpyproject.toml. - Commit the release changes.
- Create and push a tag that matches the version:
git tag v1.0.0
git push origin v1.0.0- Approve the
pypienvironment in GitHub when thePublishworkflow starts. - Confirm the release at
https://pypi.org/project/nomnom-py/.
dist/should be treated as build output; rebuild it for every release.- If you want to dry-run the pipeline before the first public release, publish to TestPyPI manually instead of tagging production.