Releasing ADR Sensor
July 31, 2026 ยท View on GitHub
ADR Sensor releases are built from GitHub Release tags and published to PyPI through OpenID Connect Trusted Publishing. The workflow does not use a long-lived PyPI token.
One-time repository setup
Complete these steps before publishing the first release:
-
In the GitHub repository settings, create an environment named
pypi. -
Add required reviewers to the environment and restrict deployment tags to
sensor-v*. -
On PyPI, create a pending Trusted Publisher for the
adr-sensorproject with these values:- Owner:
uber - Repository:
ADR - Workflow:
release-sensor.yml - Environment:
pypi
- Owner:
PyPI can create the project during the first successful publication when a pending publisher is configured. See the PyPI Trusted Publishing guide.
Release process
- Update
project.versioninSensor/pyproject.toml. - From
Sensor/, runuv lockand commit the updated lockfile. - Update the release notes and open a pull request.
- Verify that CI succeeds and merge the pull request to
main. - In GitHub Releases, create a release targeting
mainwith a tag namedsensor-vX.Y.Z. The tag version must exactly matchproject.version. - Publish the GitHub Release.
- Approve the
pypienvironment deployment when prompted.
The Release ADR Sensor workflow then performs these actions:
- Checks out the exact release tag.
- Confirms that the tag and package version match.
- Runs the Sensor test suite and builds the wheel and source distribution.
- Publishes both distributions to PyPI using a short-lived OpenID Connect credential.
- Attaches the distributions to the GitHub Release.
Package versions on PyPI are immutable. If publication succeeds, never move or reuse the release tag. Publish any correction as a new version.