Use GitHub OIDC Trusted Publishing for releases. Do not rely on a long-lived PyPI API token unless Trusted Publishing is unavailable.
- Rename the local branch to
mainif needed. - Create the public GitHub repo and push the current branch:
gh repo create luckyPipewrench/pipelock-verify-python \
--public \
--source . \
--remote origin \
--push \
--description "Python verifier for Pipelock action receipts (Ed25519-signed, chain-linked)"- On PyPI, add a pending trusted publisher for:
- Project name:
pipelock-verify - Owner:
luckyPipewrench - Repository:
pipelock-verify-python - Workflow:
release.yml - Environment:
pypi
- Project name:
- Confirm the version in
pyproject.tomlmatches the release tag you plan to push. The GitHub Actions release workflow enforces this. - Create the first signed, annotated tag and push it. The release-tags
ruleset rejects unsigned tags, so use
-a -s(or rely ontag.gpgsign = truein your git config):
git tag -a -s v0.1.0 -m "pipelock-verify 0.1.0"
git push origin main --tagsGitHub Actions builds the distributions, checks them with twine, and publishes
to PyPI through OIDC.
- Bump
project.versioninpyproject.toml. - Install local maintainer tooling if needed:
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev,release]"- Run the verification gates:
pytest
ruff check pipelock_verify tests
ruff format --check pipelock_verify tests
mypy pipelock_verify
python -m build
twine check dist/*- Commit the version bump, then create a signed, annotated tag for the same version:
git tag -a -s vX.Y.Z -m "pipelock-verify X.Y.Z"
git push origin main --tagsIf the tag version and pyproject.toml version diverge, the release workflow
fails before publish.