Add release-plz automated release pipeline#1
Merged
Conversation
Configures release-plz to manage version bumps, changelog generation, git tags, GitHub releases, and crates.io publishing on push to main.
There was a problem hiding this comment.
Reviewed the diff and ran through the release-plz config against the crate layout.
Looks good
release-plz.tomluses the right structure for a single-crate repo (the[workspace]table is release-plz's global-defaults section, not a Cargo workspace declaration — correct usage here).git_tag_name = "v{{ version }}"matches the existingv0.1.0/v0.2.1tags already onmain, so release-plz won't try to retag old versions.semver_check = trueis a nice safety net before publishing.- Workflow split into a
release-prjob and areleasejob is the canonical release-plz setup; permissions are correctly scoped per job. fetch-depth: 0+persist-credentials: falseare the recommended settings.
Minor observations (non-blocking)
CARGO_REGISTRY_TOKENis exported into therelease-plz-prjob too. Harmless, but only thereleasejob actually publishes, so it could be dropped from the PR job.id-token: writeon thereleasejob is only needed if you switch to OIDC trusted publishing on crates.io. Since the plan is to useCARGO_REGISTRY_TOKEN, it's currently unused — fine to leave for future use.- No
concurrencygroup onrelease-plz-release. Probably fine because it only fires on push-to-main after a release-PR merge, but adding one would prevent overlap if two release PRs land back-to-back.
Prerequisites are already called out in the PR body — CARGO_REGISTRY_TOKEN secret, crate ownership on crates.io (or rename), workflow permissions toggle, and the repository = "tweedegolf/irmars" URL in Cargo.toml. Nothing to add there.
Approving — this can land as-is, and the follow-ups in the description gate the first successful publish, not the merge.
Remove CARGO_REGISTRY_TOKEN; release-plz authenticates via OIDC using id-token: write, per the release-plz quickstart guide.
The original 'irma' name is taken on crates.io by the upstream tweedegolf maintainers, so publish the fork as 'irmars' to match the repository name. Also update the repository URL to point at the encryption4all fork and add a readme field.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
release-plz.tomlconfiguring single-crate releases forirmawithv<version>tags andcargo-semver-checksenabled..github/workflows/release-plz.ymlwith two jobs:release-plz-pr(maintains an open release PR with version bump + changelog) andrelease-plz-release(tags, creates a GitHub release, and publishes to crates.io after the release PR merges).id-token: write) — noCARGO_REGISTRY_TOKENsecret needed.Follow-ups before the first release works end-to-end
irmacrate on crates.io (Settings -> Trusted Publishing): repositoryencryption4all/irmars, workflowrelease-plz.yml, no environment. Per crates.io's limitation, the first publish of a new crate must still be done manually — trusted publishing only works on crates that already exist on crates.io. Theirmacrate is owned by the original tweedegolf maintainers, so either request ownership or rename the crate (e.g.irma-e4a) and do the first manual publish yourself.Settings -> Actions -> General -> Workflow permissions, enable "Allow GitHub Actions to create and approve pull requests" so the release PR can be opened.Cargo.tomlstill pointsrepository = "https://github.com/tweedegolf/irmars"; update toencryption4all/irmarsbefore the first publish.Test plan
release-plz-prjob opens a "chore: release" PR.release-plz-releasecreates the tag, GitHub release, and (once trusted publishing + crate ownership are in place) publishes to crates.io.