Skip to content

Release Process

Opencomplai follows Semantic Versioning (MAJOR.MINOR.PATCH). Four Python packages ship from this repo, all published to PyPI: opencomplai-core, opencomplai-cli, opencomplai-ai, and the opencomplai meta-package (the SDK). To find the version currently released, check the version field in packages/core/pyproject.toml (the other three packages track it — see below), the PyPI badge in the repo README, or run opencomplai --version. Don't trust a version number written into this page as a fact — packages move fast enough that it would go stale.


Version policy

Package Versioning
opencomplai-core Semver; breaking model or rule API changes bump MAJOR
opencomplai-cli Semver; new commands or changed exit codes bump MINOR
opencomplai-ai Semver; follows core
opencomplai (SDK meta-package) Semver; follows core and cli
Gateway API Path-prefix versioning (/v1/, /v2/); parallel for ≥ 90 days

All four Python packages move together — same version number across all four pyproject.toml files in a given release. The gateway API versions independently of the Python packages.


Build and publish order

The four packages have a dependency chain, so they are built and published in this order (both locally and in CI):

  1. opencomplai-core — no local dependencies.
  2. opencomplai-cli — depends on opencomplai-core.
  3. opencomplai-ai — depends on opencomplai-core only, independent of cli.
  4. opencomplai (SDK meta-package) — depends on both opencomplai-core and opencomplai-cli, so it is always built and published last.

Checker widget build prerequisite

Before opencomplai-cli is built, the docs checker widget must be built:

Text Only
cd docs/checker-widget && npm ci && npm run build

This generates packages/cli/src/opencomplai_cli/data/checker-local.html, a git-ignored asset that packages/cli/pyproject.toml force-includes into the wheel. Skip this step and the opencomplai-cli build fails with "Forced include not found." .github/workflows/publish-pypi.yml runs this build automatically before building any of the four distributions, so a tag-push release never needs it done by hand.


Release checklist

  1. Create a release branch from main: git checkout -b release/vX.Y.Z.
  2. Bump version to the same new value in all four package manifests:
  3. packages/core/pyproject.toml
  4. packages/cli/pyproject.toml
  5. packages/ai/pyproject.toml
  6. packages/sdk-python/pyproject.toml
  7. Update CHANGELOG.md — move items from Unreleased to the new version heading.
  8. Run the full test suite: uv run pytest packages/ for the four Python packages, plus cd services/gateway-api && pnpm test for the gateway API.
  9. Open a release PR targeting main, get it reviewed, and merge it.
  10. Tag the merge commit vX.Y.Z and push the tag.
  11. Pushing the tag triggers .github/workflows/publish-pypi.yml — its build job first checks the tag against the four manifest versions and fails on any mismatch, builds the checker widget and all four distributions, runs the wheel smoke test and generates a CycloneDX SBOM per package (kept as a workflow-run artifact). Only then does the publish job upload the tested distributions to PyPI in the dependency order above via Trusted Publishing (OIDC; no stored API token) with PEP 740 attestations. Each upload uses skip-existing: true, so re-pushing a tag for a version already on PyPI is a no-op, not an error. A manual workflow_dispatch run is a dry run: it builds, smoke tests and produces SBOMs, and publishes nothing.
  12. Create a GitHub Release from the tag with the CHANGELOG section as the body.
  13. Bump the GitHub Action. Once the four packages are on PyPI, in a checkout of Opencomplai/opencomplai-action run scripts/bump-cli-version.sh X.Y.Z, add a CHANGELOG entry, commit, publish a release vMAJOR.MINOR.PATCH with "Publish this Release to the GitHub Marketplace" ticked, and move the v1 tag to it (that repository's release.yml does this once Actions run there). Check that the new pin is live: curl -s https://raw.githubusercontent.com/Opencomplai/opencomplai-action/v1/action.yml | grep -A2 "^ version:" shows X.Y.Z.

Homebrew tap and signing secret

Both operations below are founder-only. Run them by hand on the founder's machine after a release is on PyPI. Nothing in the release tag workflow creates a repository or a secret.

Homebrew tap (the tap Opencomplai/homebrew-tap has existed since 8 Nov 2026 and holds the published formula; run the steps in this order; replace <version> with the released version)

  1. Confirm the new version's sdist is on PyPI: open https://pypi.org/project/opencomplai/<version>/#files.
  2. Copy packaging/homebrew/opencomplai.rb to a scratch file and run bash scripts/homebrew-release.sh <version> --formula <copy>. It reads the sdist sha256 and the hashed source url from the PyPI JSON, downloads the sdist and checks that its bytes match that digest, then patches the copy's url and sha256. It refuses a placeholder or all-zero digest, a checksum mismatch, and a url that is not a PyPI files url for this sdist or that disagrees with the JSON's blake2b_256 digest, and it patches the formula once the index, digest and download checks pass; the lint step runs after the patch and a failure leaves the patched file for you to review. Exit code 0 means pass, 1 means a named step failed, 2 means bad usage. The committed template keeps its placeholder hash, so this step changes no file in the repository.
  3. Add the dependency resource blocks to the copy. brew update-python-resources ignores releases under 24 hours old, so on release day it fails; run it the next day, or use the formula's Python (3.12) to run python -m pip install --dry-run --ignore-installed --report report.json opencomplai==<version> and then python packaging/homebrew/resources.py report.json <copy>, which refuses any third-party package under 24 hours old.
  4. Build and test the copy in a throwaway homebrew/brew container, as described in packaging/homebrew/README.md: brew style, brew audit --strict --new, brew install --build-from-source, brew test and a real opencomplai check.
  5. Copy the copy to Formula/opencomplai.rb in the tap repository and push it with git push. On a Windows machine the push can open a Git Credential Manager "Select an account" window: choose the account that has write access to the organisation.
  6. In a clean container, run brew tap Opencomplai/tap and then brew install Opencomplai/tap/opencomplai once, and run brew test on it.

What flips planned to live: only after the tap is pushed (step 5) and step 6 works on the platforms the page names (on 8 Nov 2026 it was proven on Linux only; macOS is untested), edit the "Homebrew (planned)" block in docs/src/getting-started/installation.md and the matching assertion in packages/cli/tests/test_homebrew_formula.py in one commit. Until then the installation page stays "planned".

Signing secret (independent of the tap, and may be done at any time)

Run gh auth login yourself first. Then run bash scripts/signing-secret.sh OPENCOMPLAI_SIGNING_KEY <owner>/<repo>, where <owner>/<repo> is the repository that holds the release workflow. The script generates an Ed25519 key in memory and pipes it straight to gh secret set. The private key is never printed and never written to a file. The script prints only the public key, so publish that public key for verifiers. It refuses to replace an existing secret unless you pass --replace, because a replacement changes the key that every earlier signature was made with.

For how the secret is used in CI, see Attach the artifact to a release. For key handling, see Key management.

Order of steps

  1. Release on PyPI through the tag workflow.
  2. The tap repository exists (created 8 Nov 2026).
  3. Run the Homebrew steps above (scripts/homebrew-release.sh, the resource blocks, the container test), then push the tap.
  4. Flip the installation page to live after brew install works from a clean machine.
  5. Create the signing secret with scripts/signing-secret.sh (independent of the tap).

Hotfixes

For critical security or correctness fixes on a released version:

  1. Branch from the release tag: git checkout -b hotfix/vX.Y.Z+1 vX.Y.Z.
  2. Apply the minimal fix.
  3. Follow the release checklist from step 2.