feat(release): add unified release workflow with release-plz#10457
feat(release): add unified release workflow with release-plz#10457gustavovalverde wants to merge 4 commits into
Conversation
Replace the manual 51-item release checklist with an automated pipeline. One workflow handles the entire release: crate publishing via release-plz with trusted publishing (OIDC), Docker image build, and Docker Hub push. Job-level permissions isolate secrets — crate publishing (id-token:write) never shares a job with Docker Hub credentials. The GCP deployment workflow (zfnd-deploy-nodes-gcp.yml) continues to trigger independently on the release:published event.
The zfnd-build-docker-image.yml reusable workflow gates Docker Hub publishing on `github.event_name == 'release'`. Since our workflow triggers on `push`, the Docker Hub publish would be silently skipped. Instead, keep release-binaries.yml as the Docker pipeline — it triggers on `release: released` events, which release-plz fires when creating the GitHub Release. The chain is: release.yml (push) → publishes crates → creates GitHub Release release-binaries.yml (release:released) → Docker Hub zfnd-deploy-nodes-gcp.yml (release:published) → GCP deployment
Delete release-drafter.yml workflow and its config — changelog generation is now handled by release-plz with git-cliff. Archive the 51-item release checklist as release-checklist-legacy.md and replace it with a ~20-item checklist for reviewing release-plz Release PRs.
mpguerra
left a comment
There was a problem hiding this comment.
Had a quick glance, looks good but didn't reason about it in detail.
Not sure if this should be added to the release workflow but we should find some way to publish the EOS height for zebra (possibly with an estimated EOS date based on height) somewhere visible for end users similar to what is done for zcashd.
|
I'm a bit wary of using release-plz because I had problems with it when I tried. I think it was something like, if it stops in the middle for whatever reason (internet disconnect, etc.) you have to resume it manually. IIRC I think I had problems where a tag was created but the crate was not published, and when trying again it would refuse to publish because the tag already existed, or something similar. This also does not fully capture our workflow. We use That being said we can try this, just need to be aware of the possible issues. |
…n checklist Install cargo-semver-checks in the release-pr job so release-plz's API-breaking-change detection actually runs; without the binary on PATH it logs a warning and leaves no (⚠️ API breaking changes) marker in the Release PR description. Set git_release_draft so the GitHub Release stays in Draft after crates publish. Downstream release-binaries.yml and zfnd-deploy-nodes-gcp.yml key on released/published events that do not fire for drafts, making the promote step a human gate before Docker Hub and GCP deploy. Compress the release checklist from narration to decisions, align the recovery section with release-plz's verified idempotency behavior (tag-exists and is-published skip logic in release_plz_core/src/command/release.rs), and drop redundant re-run scenarios.
Motivation
Zebra releases currently follow a 51-item manual checklist taking 4-8 hours, blocking the team via Mergify queue freeze. Publishing uses personal API tokens, and changelogs are manually curated with a known race condition in Release Drafter.
Solution
Add a release-plz pipeline that automates crate publishing and GitHub Release creation.
Release chain
The
releasejob exits early for non-Release-PR commits (release_always = false).release-binaries.ymlstays unchanged — it triggers on therelease:releasedevent that release-plz creates.What this replaces
release-drafter.yml→ release-plz + git-cliff generate changelogsVerified locally
release-plz updatecorrectly detects all 12 crates, compares against crates.io, bumps versions from conventional commits, and generates per-crate changelogs.Tests
The workflow activates on merge to main. Until trusted publishing is configured on crates.io, the
releasejob will succeed but skip crate publishing.AI Disclosure
PR Checklist
type(scope): description