Publishing¶
codexloop ships via Trusted Publishing
(OIDC). No long-lived PyPI API tokens are stored in GitHub.
Environments¶
| GitHub Environment | Index | Branch / workflow |
|---|---|---|
testpypi |
https://test.pypi.org | develop → .github/workflows/publish-testpypi.yml |
pypi |
https://pypi.org | main → .github/workflows/release-please.yml (publish-pypi) |
Create them once (repo Settings → Environments), or via API as in the setup checklist below.
One-time Trusted Publisher setup¶
Do this before the first upload (pending publisher), signed in as the PyPI owner account.
TestPyPI¶
- Open https://test.pypi.org/manage/account/publishing/
- Add a pending publisher:
- PyPI Project Name:
codexloop - Owner:
adammatthewsteinberger - Repository name:
codexloop - Workflow name:
publish-testpypi.yml - Environment name:
testpypi
PyPI¶
- Open https://pypi.org/manage/account/publishing/
- Add a pending publisher:
- PyPI Project Name:
codexloop - Owner:
adammatthewsteinberger - Repository name:
codexloop - Workflow name:
release-please.yml - Environment name:
pypi
Release flow¶
feat/* ──PR──► develop ──auto TestPyPI──► main ──release-please──► PyPI
- Land work on
develop. Every push todevelopruns Publish TestPyPI (publish-testpypi.yml). Do not publish TestPyPI frommain. - Smoke-install from TestPyPI if needed:
pip install -i https://test.pypi.org/simple/ --pre codexloop. - Merge
develop→mainwhen ready. release-pleaseopens a release PR againstmainonly (target-branch: mainin.github/workflows/release-please.yml).- Squash-merge the release PR → GitHub Release + tag →
publish-pypiuploads to PyPI. Do not open or mergechore(develop): release …PRs.
Manual PyPI retry (Trusted Publishing, main / tagged release only):
gh workflow run release-please.yml -f publish_to_pypi=true
Manual TestPyPI from develop:
gh workflow run "Publish TestPyPI" --ref develop
Local dry-run (no upload)¶
python -m build
twine check --strict dist/*