fix(ci): sign release PR commits so they pass branch protection #388
No reviewers
Labels
No labels
adr
automated
bug
chore
dependencies
documentation
enhancement
epic
github-actions
P1-high
P2-medium
P3-low
release
research
rust
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Slipstream/eventcore!388
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/release-plz-signed-commits"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Second follow-up to the Forgejo migration. After the auth fix (#387), the release-plz run on main authenticated and pushed successfully but was rejected by the pre-receive hook:
mainrequires verified (signed) commits, and release-plz's own release-PR commit is unsigned.Fix
Adopt the pattern the other Slipstream repos (emc) use:
release-plz updateto produce the version/changelog file changes only.gpgsigheader is present before pushing.RELEASE_SIGNING_KEYsecret; committer identity matches emc's verified-by-Forgejo bot identity.Ported
configure-release-plz-git-signing.shandcreate-release-plz-release-pr.shverbatim from emc, and restructured the release-pr job to source the auth + signing helpers and run the create script instead of callingrelease-plz release-prdirectly.publish.ymlis unchanged —release-plz releaseonly pushes tags pointing at already-verified commits, so it doesn't hit the signed-commit gate.CI/infra only; no library changes.
main rejects unverified commits ("branch ... is protected from unverified commit"), and release-plz's own release-PR commit is unsigned, so its push was rejected by the pre-receive hook. Adopt the pattern the other Slipstream repos (emc) use: run `release-plz update` to produce the version/changelog file changes, then create and push an explicitly SSH-signed commit ourselves. The RELEASE_SIGNING_KEY org secret holds the bot's signing key; the commit is asserted to carry a gpgsig header before it is pushed. - Add configure-release-plz-git-signing.sh (SSH or GPG signing from RELEASE_SIGNING_KEY) and create-release-plz-release-pr.sh, ported verbatim from the emc repo. - Restructure the release-pr job to source the auth + signing helpers, set the bot identity, and run the create script instead of calling release-plz release-pr directly. - Gate the job on RELEASE_PLZ_TOKEN and RELEASE_SIGNING_KEY being set. publish.yml is unchanged: `release-plz release` only pushes tags that point at already-verified commits on main, so it does not hit the signed-commit gate.This PR introduces scripts to sign release PR commits, ensuring compliance with branch protection rules requiring verified commits. The changes appear safe to merge, focusing on CI improvements without affecting the library code.
Walkthrough
configure-release-plz-git-signing.shto configure SSH or GPG signing based on the provided key.create-release-plz-release-pr.shto create or update release PRs with signed commits.release-plz.ymlto use the new scripts for signing and creating release PRs.LLM usage and cost
Estimated total USD: $0.024905 via https://api.openai.com and https://api.openai.com