Skip to content

Adopt PR-based release process (release-plz + cargo-dist)#74

Open
JP-Ellis wants to merge 8 commits into
mainfrom
feat/pr-based-release
Open

Adopt PR-based release process (release-plz + cargo-dist)#74
JP-Ellis wants to merge 8 commits into
mainfrom
feat/pr-based-release

Conversation

@JP-Ellis

Copy link
Copy Markdown
Member

Replaces pact-cli's manual tag-driven release with the release-plz + cargo-dist stack, at parity with pact-broker-cli.

Flow

  • release-plz keeps a draft release PR (version bump + changelog) on every push to main. Merging it tags vX.Y.Z and publishes the pact crate to crates.io (trusted publishing; git_release_enable = false, so cargo-dist owns the GitHub Release).
  • cargo-dist (release.yml, on tag) builds 7 targets, publishes the Release with pact-installer.{sh,ps1}, then runs two post-announce jobs: publish-containers (Docker) and notify-homebrew.
  • CI minimisation (test.yml): draft PRs skip heavy jobs; flipping the release PR to ready runs the release-gate (full-target dist plan + live-broker ./run.sh). complete is the single required check (blocks on failed and cancelled required jobs; a skipped release-gate still passes).
  • One installer primitive: install.sh/install.ps1 shims, action.yml, and both Docker Containerfiles all consume the cargo-dist installer (~/.pact/bin).

Removed

Legacy reusable-build.yml, reusable-release.yml, cargo-publish.yml, docker.yml; cliff.toml; old docker/Dockerfile.* + hooks/; Makefile slim/build-std; the vlatest rolling release; and GHTOKENFORRELEASEDISPATCH (Homebrew now dispatches via the shared GitHub App token).

Also

  • Pin the five Pact CLI component crates to exact (=) versions so Renovate manages each bump explicitly.
  • aarch64-pc-windows-msvc stays commented pending the upstream ring fix.

⚠️ Before the first release (ops, not code)

The workflows merge cleanly, but the first release fails at the unprovisioned step unless these exist on pact-cli:

  • crates-io environment with trusted publishing configured
  • org vars.PACT_FOUNDATION_BOT_APP_ID + secrets.PACT_FOUNDATION_BOT_PRIVATE_KEY available to this repo
  • the bot App's dispatch permission to pact-foundation/homebrew-tap
  • secrets.DOCKER_HUB_USERNAME / secrets.DOCKER_HUB_TOKEN

Make complete the single required status check in branch protection once merged.

Validation

cargo build ✓, cargo nextest run ✓ (1 passed), actionlint clean across all workflows, dist plan lists the 7 targets. The Docker installer build 404s until the first cargo-dist release exists (expected).

JP-Ellis added 6 commits June 23, 2026 09:44
Replace the tag-driven release workflow with cargo-dist for building and
publishing binaries and release-plz for PR-based version bumps, changelog
generation and crates.io publishing. Container and homebrew publishing
run as cargo-dist post-announce jobs, and the release tooling is pinned
via mise (with cargo-binstall for fast installation). The superseded
reusable build/release workflows, cargo-publish job and git-cliff config
are removed.

Assisted-by: Claude Code:claude-opus-4-8[1m]
Draft PRs run only format, lint and the cross-platform test matrix;
marking a PR ready triggers a release gate that runs the full target
build and the live-broker integration tests before merge. A single
completion check aggregates the required jobs and blocks the merge when
any of them fails or is cancelled.

Assisted-by: Claude Code:claude-opus-4-8[1m]
Make the install scripts, the GitHub Action and the Docker images consume
the cargo-dist installer as the single distribution primitive, so every
entry point installs the same artifacts. The Docker images build from the
installer via new Containerfiles, replacing the bespoke Dockerfiles and
build hooks.

Assisted-by: Claude Code:claude-opus-4-8[1m]
Pin the five consolidated Pact CLI component crates to exact (`=`)
versions so Renovate manages each bump as an explicit manifest change
rather than silently floating them in the lockfile under caret ranges.

Assisted-by: Claude Code:claude-opus-4-8[1m]
The trycmd suite was gated entirely behind #[cfg(not(windows))]. The
tests/cmd cases exercise the actual binary and run identically on every
platform, so run them on Windows too. The README help snapshots stay on
Unix only: trycmd renders the binary as `pact[EXE]` in clap's usage lines
on Windows, which would not match the plain `pact` shown in the rendered
documentation.

Assisted-by: Claude Code:claude-opus-4-8[1m]
Add a committed config and a prek hook that validates every commit
message against the conventional-commits style at commit time. prek is
pinned via mise so the hook is reproducible across contributors.

Assisted-by: Claude Code:claude-opus-4-8[1m]
JP-Ellis added 2 commits June 23, 2026 12:08
Replace the platform table with the targets cargo-dist actually publishes
(target triples, Windows arm64 pending ring, BSD via the Linux musl
binaries), point installation at the cargo-dist installer instead of the
deprecated root scripts, recommend `cargo binstall pact` with a
source-build fallback, pin the GitHub Action example to a release tag,
and trim the Docker section to the published tags and registries.

Assisted-by: Claude Code:claude-opus-4-8[1m]
The per-command `--help` output makes the README very long. Wrap each
help block in a collapsed <details> section, as pact-broker-cli does, so
the command reference is easy to scan and expand on demand. The trycmd
snapshots still match the wrapped blocks.

Assisted-by: Claude Code:claude-opus-4-8[1m]
@pact-bot

pact-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

🤖 Great news! We've created a tracking ticket in PactFlow's Jira (PACT-6982) for this pull request. We'll keep work public and post updates here. Thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant