Release and PyPI publishing¶
Astro is published to PyPI as astro-pipeline. The import name and CLI remain astro.
Versioning¶
Single source of truth:
__version__insrc/astro/__init__.pyHatch reads it via
[tool.hatch.version]inpyproject.tomlRecord user-visible changes in
CHANGELOG.md
Build locally¶
pip install -e ".[dev]"
make build
Artifacts are written to dist/. Verify locally with:
twine check dist/*
For manual uploads, run twine check dist/* if your Twine version supports Metadata 2.4 (PEP 639). PyPI accepts the wheel regardless.
Publish manually¶
Use this only when not publishing via GitHub Actions.
Create a PyPI account and register the
astro-pipelineproject.Create an API token scoped to that project.
Build and upload:
make build
TWINE_USERNAME=__token__ TWINE_PASSWORD=pypi-... twine upload dist/*
Publish via GitHub Actions (recommended)¶
The workflow in .github/workflows/publish.yml publishes on:
Git push of a tag matching
v*(for examplev1.0.0)GitHub Release publish
Manual
workflow_dispatch
One-time PyPI trusted publishing setup¶
On pypi.org, register the
astro-pipelineproject (the nameastrois already taken).Open Publishing → Add a new pending publisher.
Configure:
PyPI project name:
astro-pipelineOwner:
starlincsRepository:
astroWorkflow name:
publish.ymlEnvironment name:
pypi
In GitHub, create an environment named
pypion the repository (Settings → Environments). No secrets are required for trusted publishing.Tag and push a release:
git tag v1.0.0
git push origin v1.0.0
Or create a GitHub Release from the tag; either triggers the publish workflow.
After publishing¶
Users install with:
pip install astro-pipeline
Update README.md and docs/getting-started/installation.md if install instructions change.