Charm releases should be repeatable, auditable, and driven by CI instead of local maintainer machines. The Python SDK package is published asDocumentation Index
Fetch the complete documentation index at: https://docs.charmos.io/llms.txt
Use this file to discover all available pages before exploring further.
charmos on PyPI.
Release Flow
- Merge approved changes.
- Confirm required checks pass on
main. - Review the generated draft GitHub Release.
- Bump the package version in
pyproject.toml. - Publish to TestPyPI for a package dry run.
- Create and push a
vX.Y.Ztag. - Let GitHub Actions publish to PyPI from the tag.
- Publish the GitHub Release and update docs links if needed.
Required Checks
linttypechecktestspackage-builddocs-validationbuild-validationrelease-label- TestPyPI publish for release candidates.
Package Publishing
Official package releases must be published from GitHub Actions. Do not upload wheels or source distributions from a local maintainer machine for official releases. Preferred model:pyproject.toml.
For example, version = "0.4.22" must be released from tag v0.4.22.
Trusted Publishing Setup
Charm uses PyPI Trusted Publishing through GitHub OIDC. This avoids storing long-lived PyPI API tokens in GitHub secrets. Configure these trusted publishers in PyPI:- PyPI project:
charmos - Owner:
CharmAIOS - Repository:
Charm - Workflow:
publish-pypi.yml - Environment:
pypi
- TestPyPI project:
charmos - Owner:
CharmAIOS - Repository:
Charm - Workflow:
publish-testpypi.yml - Environment:
testpypi
testpypifor package dry runs.pypifor production package publishing.
pypi environment should require maintainer approval.
TestPyPI Dry Run
Use TestPyPI before publishing a production package:- Confirm the release branch is merged into
main. - Run the
Publish to TestPyPIworkflow manually. - Confirm the workflow builds both package artifacts.
- Confirm the package appears on TestPyPI.
- Install from TestPyPI in a clean virtual environment:
Production PyPI Release
After the TestPyPI dry run succeeds:- Confirm
pyproject.tomlcontains the intended version. - Confirm the draft GitHub Release has the correct changelog.
- Create and push the version tag:
- Wait for
Publish to PyPIto complete. - Install the published package in a clean environment:
- Publish the GitHub Release for the same tag.
Hotfixes
Hotfixes should be narrow and traceable:- Identify the broken release or deploy.
- Create a patch branch.
- Apply the smallest safe fix.
- Run required checks.
- Run the TestPyPI dry run.
- Publish a patch release or redeploy.
- Document the fix in release notes.
Rollback Options
- Revert and redeploy.
- Roll back a Cloud Run revision.
- Publish a patch package.
- Yank a bad PyPI package if appropriate.
- Apply a database mitigation migration.
