Release dbt-redis-adbc

The Publish to PyPI workflow builds the wheel and source archive once from an existing stable version tag. It checks the tag against the package and runtime versions, verifies distribution metadata and checksums, and runs the existing CI workflow against the exact source commit with the built wheel installed. The project runs on both locked dependencies and the oldest supported dbt combination; dbt's functional adapter suite runs on locked dependencies. Each integration job provisions a dedicated Redis Enterprise database with verified TLS and named-user authentication.

The release jobs replace the editable adapter with the wheel, verify its origin and imported module path, and disable automatic environment synchronization so subsequent dbt and pytest commands continue testing that installed wheel.

After every validation job passes, the workflow publishes the same distributions to PyPI through GitHub OIDC. It checks PyPI's file hashes against the tested artifacts, then creates or updates the GitHub release, attaches the wheel, source archive and SHA256SUMS, and marks the release published and latest. Publication to PyPI and GitHub happens only on tag pushes or an explicitly enabled manual publication. No long-lived PyPI token is required.

Nightly driver releases

dbt-redis-adbc versions match the Redis ADBC driver release they were tested with: driver v0.0.33 is released as dbt-redis-adbc 0.0.33, tag v0.0.33. The Driver release workflow does this every night at 08:47 UTC:

  1. It finds the driver's latest stable release. If this repository already has a tag with that name, it stops.
  2. It runs the whole CI workflow on main against exactly that driver release.
  3. If every job passes, it runs scripts/set_release_version.py to set the package, runtime, lockfile and installation-guide versions, commits the change to main as github-actions[bot], and pushes it with the tag. If main moved during testing, it releases nothing and the next run tests the new commit.
  4. It runs Publish to PyPI on the tag, which validates the built wheel against the same driver, publishes it to PyPI and finalizes the GitHub release. It then adds the tested driver to the release notes, closes that driver's failure issue, and republishes the documentation website.

Any failure opens an issue labeled driver-release titled Redis ADBC driver vX.Y.Z fails release validation, listing the failed jobs. Later failures for the same driver comment on the open issue instead of opening another. Until the tag is pushed, each nightly run retests the driver release against the current main, so merging a fix is enough. A failure after the tag is pushed (in Publish to PyPI) is not retried; see Retry a failed release.

To test or release a specific driver release, open Actions → Driver release → Run workflow and enter its tag. Clear Release if the tests pass to run the tests only. Runs from branches other than main never release.

Versions 0.1.0 through 0.3.2 predate this scheme and would sort above the driver-matched 0.0.x releases. They are yanked on PyPI, and their GitHub tags and releases are deleted, so pip installs the newest driver-matched release. An exact pin such as dbt-redis-adbc==0.3.2 still installs a yanked version. Because each version belongs to a driver release, an adapter-only change ships with the next driver release.

Prepare a release

The nightly workflow normally does this. To release by hand:

  1. Run python3 scripts/set_release_version.py 0.0.33 --driver v0.0.33 with the driver release's version. It updates v1/adapter/pyproject.toml, the adapter's __version__.py, the adapter version in v1/uv.lock, and the installation versions in README.md, docs/INSTALLATION.md, and v1/adapter/README.md. Merge the change after CI passes.
  2. Create a stable tag such as v0.0.33 on that exact commit and push the tag.
  3. Watch Actions → Publish to PyPI. Tag pushes automatically build, test, publish to PyPI, verify published hashes, and finalize the GitHub release.
  4. Review the generated GitHub release notes and add user-facing details as needed.

Do not build or attach release packages manually. The GitHub release is finalized only after PyPI publication and verification succeeds. The native dbt v2 engine fork has a separate distribution process; this workflow releases the Python v1 adapter.

Validate without publishing

Open Actions → Publish to PyPI → Run workflow, choose the workflow branch, and enter an existing tag. Leave Publish to PyPI and finalize GitHub release unselected (the default). This runs the actual build and wheel integration tests and retains artifacts, while skipping both publishing jobs. For example, use v0.2.0 to validate pipeline changes without altering that existing release.

To publish an existing, unpublished tag, run the same workflow with publication enabled. The package and runtime versions must match the tag. Tags are resolved to an immutable commit for building and testing; finalization refuses a tag that has moved since the build.

Retry a failed release

Prefer Re-run failed jobs on the original run so it reuses the already built artifacts. If an upload completed before a later step failed, existing PyPI files are skipped, but finalization still requires both PyPI files' SHA-256 hashes to match the tested artifacts exactly. A differing package cannot silently replace an already published version. Investigate any mismatch and use a new version when package contents need to change; never move an existing release tag.

Trusted publisher setup

The existing PyPI project's publishing settings must contain this GitHub trusted publisher:

Field Value
Owner redis
Repository redis-dbt-adapter
Workflow publish.yml
Environment pypi

Only the publishing job receives id-token: write; only GitHub finalization receives contents: write. Build and test jobs have read access. Repository administrators can configure reviewers and deployment restrictions on the pypi environment. See PyPI's trusted publishing documentation.