Repository navigation
Publishing
Publishing is manual. The Publish package workflow has no push, tag or release-event
trigger. It runs only after a maintainer starts it on master with an existing release
tag and the confirmation publish.
Create an account on PyPI and a separate account on TestPyPI. Enable the account's required two-factor authentication. For a new project, add a pending publisher on each service using its account publishing settings. For an existing project, use its project publishing settings.
Enter these exact values for the GitHub Trusted Publisher:
| Setting | Value |
|---|---|
| Project name | smd-reports |
| Repository owner | SMD-Bioinformatics-Lund |
| Repository | smd-reports |
| Workflow filename | release.yml |
| Environment on PyPI | pypi |
| Environment on TestPyPI | testpypi |
The repository uses matching GitHub environments restricted to the master branch.
The workflow obtains short-lived publishing credentials through OIDC; no PyPI token
needs to be committed or stored in repository secrets. Account-side registration must
be completed by the account holder in PyPI and TestPyPI.
See the official Trusted Publishing guide for account-side registration. If the GitHub repository is private, its documentation and example links will remain private too; publishing a package does not change repository visibility.
After the development PR is merged into dev and the release PR is merged into master:
- Confirm the version in
src/smd_reports/__init__.pyand the changelog. - Create the matching tag, for example
v0.1.1, on the release commit inmaster. - Open GitHub Actions → Publish package → Run workflow.
- Select branch
master, enter the tag, choosetestpypiand typepublish. - Review the completed checks and TestPyPI installation verification.
- Start the workflow separately with the same tag and index
pypiwhen ready.
The workflow requires a matching nonempty changelog entry and a version newer than previous
release tags on master. It also checks tag/version agreement, tag existence and ancestry, then runs
a successful merged release PR with exactly the same Git tree. Its Quality run must
have passed lint, documentation, every supported Python version and PDF tests, and its
branch-flow checks must have passed. Fork runs, skipped checks and changed release
contents do not satisfy this requirement.
Publication then builds and checks distributions and verifies isolated wheel/source installation. It reuses the completed PR validation instead of repeating the full test suite for TestPyPI and PyPI. Each index still requires its own explicit dispatch. Only the checked artifacts are passed to the publishing job. Package versions cannot be overwritten; an existing version requires a new release rather than replacement files.
Copyright © 2026 Ram Nanduri
Getting started
User guide
Reference
Development